How to internationalize a ruby ​​stone?

What is the best way to deliver the gem using the default transitions for i18n for the strings it uses?

+4
source share
2 answers

There are a few things you need to do:

  • enable i18n as a dependency
  • internationalize your gem by replacing strings with I18n.t calls
  • create a YAML translation file and add it to I18n load_path (e.g. I18n.load_path += 'path/to/your/en.yml' )

In general, you can also create a public project in Locale to translate translations to other locales if you are so inclined.

+3
source

what do you mean? Do you have a project that you want to internationalize? You can look at the i18n gem . But actually it is not so important, as, for example, I did the following: notebot .

-1
source

All Articles