Tolk is the Rails plugin which allows you to support more than one language for you application easily, as long as your Rails application is running on Rails framework 2.3 version.
Dropping the plugin into your Rails application is dead simple, you just need to open your console, navigate to your app directory and put:
$ script/plugin install git://github.com/dhh/tolk.git
Next, you need to setup it with
$ script/generate tolk_migration
$ rake db:migratefor database and
$ cd public $ ln -s ../vendor/plugins/tolk/public/tolk tolk
to set up Tolk assets. After doing that you’re ready to go and use translations in your Rails application.
Also, I’ll give you a short overview how tolk works and why it is very handy:
Tolk’s default configuration treats I18n.default_locale as the master source of strings to be translated. Of course this setting can be changed with Tolk::Locale.primary_locale_name, though it gives you the general idea how Tolk works.
As a developer you are expected to make all the changes to the master locale file ( en.yml by default ) and treat all other locale.yml
files as readonly files.
Of course this could shortly generate the synchronization issues so Tolk comes with a several rake tasks defined to update Tolk db.
Tolk also supports authentication, you can configure Tolk to accept only requests from certain users.
