Marten
Marten

Reputation: 1356

I18n in a growing rails app

I have a growing rails app that will support different languages. So when something is implemented there will be new language strings, which will not be translated to all available languages on the spot. Should I check if a language file is complete and when yes, how should I do it? If not, how should I handle a missing string. My Idea was to use English as a fallback locale for all languages and automatically create an issue ticket whenever the Fallback-back-end is hit.

Upvotes: 0

Views: 79

Answers (1)

amitkaz
amitkaz

Reputation: 2712

For the fallback:

config.i18n.fallbacks = true
config.i18n.fallbacks = [:en]

Don't wait for a fallback to occur to know there is a fallback. Have a task that search all of the en i18n, and try to find it in all the languages.

That way you'll find all the missing locales before deploying

Upvotes: 2

Related Questions