Configure locales as explained in the Rails Internationalization (I18n) API guide. For the most foolproof configuration, set available locales, default locale, and fallbacks.
# config/application.rb # ... module YourApp class Application < Rails::Application # ... config.i18n.available_locales = [:en, :de] config.i18n.default_locale = :en config.i18n.fallbacks = [:de, :en] # ... end end
Then, add the full name of the locale to each locale file. This is required for Workarea to recognize and use the locale.
# config/locales/en.yml en: name: English
Adding Additional Locales to an Existing App
When adding a locale to an existing Production app, you must consider the impact on search indexes. At a minimum, you must create additional search indexes to account for the additional locale. However, you may also want to index documents as well, to ensure adequate search results within that locale.
Review the Search guide to understand the relationship between locales and search indexes.
In Development, there should be no harm in fully re-indexing search by running a Rake task to create and populate the necessary indexes.
How'd We Do?
Was this article missing something?
Was it not quite what you were looking for?
Do you have suggestions on how we could improve this article or your experience in general?
If so, please take a moment to let us know!
Your invaluable feedback will help everyone better understand the platform!