Technical Documentation
Return to Main Documentation
ENGLISH - version 2.3
ENGLISH - version 2.3
  • Introduction
  • Getting started
    • Create your fork
    • Configure your fork
    • Keep your fork updated
    • Communication
  • Installation
    • Local installation
      • Prerequisites
      • Ubuntu Linux
      • Debian Linux
      • macOS
      • Windows
      • Vagrant
      • Docker
    • Production and staging servers
      • Installer
      • Create a deploy user
      • Generating SSH Key
      • Manual installation (not recommended)
      • Digital Ocean
      • Heroku
      • Mail server configuration
    • Basic configuration
    • User documentation and guides
  • Customization
    • Introduction
    • Translations and texts
    • Images
    • Styles with CSS
    • JavaScript
    • Models
    • Controllers
    • Views and HTML
    • Components
    • Other Ruby classes (GraphQL, lib, mailers, builders)
    • Gems
    • Application configuration
    • Routes
    • Tests
  • Technical Features
    • OAuth
    • GraphQL
    • Debates and proposals recommendations
    • Configure Census Connection
    • Local Census
    • Multitenancy
    • User content translations
  • Open Source project
    • Code of conduct
    • Contributing
    • Coding conventions
    • Open source forks and modifications
    • License
Powered by GitBook
On this page
  • Translations
  • Custom texts
  • Maintaining your custom texts and languages
  1. Customization

Translations and texts

PreviousIntroductionNextImages

Last updated 2 months ago

Translations

Currently, Consul Democracy is totally or partially translated to multiple languages. You can find the translations at the .

Please to help us complete existing languages, or contact us through to become a proofreader and validate translators' contributions.

If your language isn't already present in the Crowdin project, please and we'll set it up in a breeze.

The existing translations of the user-facing texts are organized in YAML files under the config/locales/ folder. Take a look at the official Ruby on Rails to better understand the translations system.

Custom texts

Since Consul Democracy is always evolving with new features, and in order to make it easier to update your fork, we strongly recommend that translation files aren't modified, but instead "overwritten" with custom translation files in case you need to customize a text.

So, if you'd like to change some of the existing texts, you can add your changes to the config/locales/custom/ folder. You should only include the texts you'd like to change instead of copying the original file. For example, if you'd like to customize the text "CONSUL DEMOCRACY, 2024" (or the current year) that appears on the footer of every page, first locate where it's used (in this case, app/components/layouts/footer_component.html.erb) and look at the locale identifier inside the code:

<%= t("layouts.footer.copyright", year: Time.current.year) %>

Then find the file where this identifier will be located (in this case, config/locales/en/general.yml), and create a file under config/locales/custom/ (in this case, create a file named config/locales/custom/en/general.yml) with the following content:

en:
  layouts:
    footer:
      copyright: Your Organization, %{year}

Note that custom locale files should only include your custom texts and not the original texts. This way it'll be easier to upgrade to a new version of Consul Democracy.

Maintaining your custom texts and languages

Consul Democracy uses the gem, which is an awesome tool to manage translations. Run i18n-tasks health for a nice report.

If you have a custom language different than English, you should add it to both base_locale and locales variables in the , so your language files will be checked as well.

Crowdin project
join the translators
Consul Democracy's discussions
open an issue
internationalization guide
i18n-tasks
i18n-tasks.yml config file