You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For an application I needed to add variations in my translation files, the way I see most people do it is creating just more locale files like en_formal.yml & en_informal.yml. I kinda find that very very ugly and not at all DRY. So that why I made this initializer that partly overrides this gem.
Here is the gist, with my code and explanation: I18n Variations
TL:DR;
It's making this work:
en:
some_translation_that_does_not_have_variations: "Hello world, I say my greetings to everyone the same way!"some_translation_that_has_variations:
formal: "I am being very polite here"informal: "I am not, deal with it."
If people maintainers think this is awesome or might be a good fight I would like to implement it to the gem.
The text was updated successfully, but these errors were encountered:
Hello!
For an application I needed to add variations in my translation files, the way I see most people do it is creating just more locale files like
en_formal.yml
&en_informal.yml
. I kinda find that very very ugly and not at all DRY. So that why I made this initializer that partly overrides this gem.Here is the gist, with my code and explanation: I18n Variations
TL:DR;
It's making this work:
If people maintainers think this is awesome or might be a good fight I would like to implement it to the gem.
The text was updated successfully, but these errors were encountered: