Sha256: 9c8eccc59fb84f293f9210c118067d768793193df1e390f388ff05d107aada62

Contents?: true

Size: 1.94 KB

Versions: 36

Compression:

Stored size: 1.94 KB

Contents

= Custom Texts

== Using custom locales

You can change most of the texts through the Administration panel.

If you want to change a given text that isn't on the Administration panel, and belongs on Decidim code, you should first find out which key is being used. For instance, you want to change the home page text where it says "Let's build a more open, transparent and collaborative society.", you would search the text (using https://github.com/decidim/decidim/search?utf8=%E2%9C%93&q=%22Let%27s+build+a+more+open%2C+transparent+and+collaborative+society.%22&type=[github] or grep) and then you would extract that key and their parents. On this case it'd be:

[source,yml]
----
en:
  pages:
    home:
      footer_sub_hero:
        footer_sub_hero_body: Let's build a more open, transparent and collaborative society.<br /> Join, participate and decide.
----

You need to create a file for this translation as http://guides.rubyonrails.org/i18n.html[Ruby on Rails i18n documentation] says, for instance config/locales/home.en.yml, you can see a currently working example in https://github.com/AjuntamentdeBarcelona/decidim-barcelona/pull/206[this PR].

== Using external module

There is an external module https://github.com/mainio/decidim-module-term_customizer[decidim-term_customizer], according with the project README:

____
The module allows administrators to add "translation sets" through the admin panel which contain customized terms for any module in the system. These sets can be applied against different scopes within the system, e.g. the whole system, participatory space scope (e.g. all participatory processes or a specific participatory process) or a specific component within a participatory space.
____

To implement this on your decidim installation follow the https://github.com/mainio/decidim-module-term_customizer/blob/master/README.md[documentation in the external module].

You can see an example in https://github.com/decidim/metadecidim/pull/38[this PR].

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
decidim-0.27.9 docs/modules/customize/pages/texts.adoc
decidim-0.27.8 docs/modules/customize/pages/texts.adoc
decidim-0.27.7 docs/modules/customize/pages/texts.adoc
decidim-0.27.6 docs/modules/customize/pages/texts.adoc
decidim-0.26.10 docs/modules/customize/pages/texts.adoc
decidim-0.26.9 docs/modules/customize/pages/texts.adoc
decidim-0.27.5 docs/modules/customize/pages/texts.adoc
decidim-0.26.8 docs/modules/customize/pages/texts.adoc
decidim-0.27.4 docs/modules/customize/pages/texts.adoc
decidim-0.27.3 docs/modules/customize/pages/texts.adoc
decidim-0.26.7 docs/modules/customize/pages/texts.adoc
decidim-0.26.5 docs/modules/customize/pages/texts.adoc
decidim-0.27.2 docs/modules/customize/pages/texts.adoc
decidim-0.27.1 docs/modules/customize/pages/texts.adoc
decidim-0.26.4 docs/modules/customize/pages/texts.adoc
decidim-0.27.0 docs/modules/customize/pages/texts.adoc
decidim-0.26.3 docs/modules/customize/pages/texts.adoc
decidim-0.27.0.rc2 docs/modules/customize/pages/texts.adoc
decidim-0.27.0.rc1 docs/modules/customize/pages/texts.adoc
decidim-0.26.2 docs/modules/customize/pages/texts.adoc