Reputation: 3887
What is the best way to ship a gem with default i18n translations for strings used by it?
Upvotes: 4
Views: 457
Reputation: 2518
There are a couple of things you need to do :
i18n
as a dependencyI18n.t
callsload_path
(e.g. I18n.load_path += 'path/to/your/en.yml'
)That's pretty much it, you can also set up a public project on Locale to crowdsource translations in other locales if you're so inclined.
Upvotes: 3
Reputation: 4687
what do you mean? Do you have a project you want to internationalize? you might want to look at the i18n gem. But it is really no big deal to roll your own, as I did here for example: notebot.
Upvotes: -1