Skip to content

Instantly share code, notes, and snippets.

View gaganawhad's full-sized avatar

Gagan Awhad gaganawhad

  • Desiring God
  • Minneapolis, MN
View GitHub Profile
@gaganawhad
gaganawhad / i18n conventions.md
Last active July 24, 2023 19:11
Moved to obsidian. Some conventions / guidelines / best practices that helped me while working on internationalization of a rails app.

Internationalization of a Rails App : conventions / guidelines / best practices

I have worked, and am currently working on internationalization of a Rails app. The apps require translating the ActiveRecord models. I have done some googling, but haven't really found any best practices / conventions / guidelines on how to think through this and what guidelines to follow.

I decided to create this document, to give myself a start and have it possibly help others. I am not an expert at any of this, and there may be things I am thinking incorrectly, but having it documented makes it easier to see the flaws and improve upon. If you have some ideas on additions, or think that somethings should change, get in touch.

Note: I use Globalize for model translations

  • I18n.locale controls the app wide locale. It refers to the particular localization version of the app. It defines how the app is localized to the user. It's scope is somewhat larger than the language/tran