Skip to content
/ tolk Public
forked from drogus/tolk

Tolk is a web interface for doing i18n translations packaged as an engine for Rails 3.1 applications

License

Notifications You must be signed in to change notification settings

rkyrychuk/tolk

This branch is 43 commits ahead of drogus/tolk:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a5c4b3f · Apr 11, 2013
Apr 11, 2013
Apr 11, 2012
Oct 5, 2011
Oct 5, 2011
Nov 22, 2011
Oct 5, 2011
Oct 5, 2011
Oct 29, 2008
Oct 5, 2011
Oct 5, 2011
Apr 7, 2010
Oct 5, 2011
Nov 22, 2011
Nov 22, 2011
Oct 5, 2011
Oct 5, 2011
Oct 5, 2011
Oct 5, 2011
Nov 22, 2011

Repository files navigation

Tolk

Tolk is a Rails 3.1 engine designed to facilitate the translators doing the dirty work of translating your application to other languages.

Installation & Setup

To install add the following to your Gemfile:

  gem 'tolk', :git => 'git://github.com/panva/tolk.git', :branch => 'master'

To setup just run:

  rake tolk:setup

and mount the engine in your routes.rb file

  mount Tolk::Engine => "/tolk"

Usage

Tolk treats I18n.default_locale as the master source of strings to be translated. If you want the master source to be different from I18n.default_locale, you can override it by setting Tolk::Locale.primary_locale_name. Developers are expected to make all the changes to the master locale file ( en.yml by default ) and treat all the other locale.yml files as readonly files.

As tolk stores all the keys and translated strings in the database, you need to ask Tolk to update it's database from the primary yml file :

  rake tolk:sync

The above will fetch all the new keys from en.yml and put them in the database. Additionally, it'll also get rid of the deleted keys from the database and reflect updated translations - if any.

If you already have data in your non primary locale files, you will need to import those to Tolk as a one time thing (this is also ran with setup) :

  rake tolk:import

Upon visiting http://your_app.com/tolk - you will be presented with different options like creating new locale or providing translations for the existing locales. Once done with translating all the pending strings, you are can write back the new locales to filesystem :

  rake tolk:dump_all

This will generate yml files for all non primary locales and put them in #{Rails.root}/config/locales/ directory by default.

About

Tolk is a web interface for doing i18n translations packaged as an engine for Rails 3.1 applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 88.2%
  • JavaScript 10.0%
  • Perl 1.8%