Demo application including admin interface for Rails translations using i18n_db
=Db-driven i18n demo app
A sample application that demonstrates usage of two i18n-related plugins:
In addition, this sample app contains a convenient ajaxified translations editor and a simple locale list editor.
http://yar.name/pics/i18n_db_admin_editor-20090207-035438.png
http://yar.name/pics/i18n_db-20090207-042714.png
After checking out, do not forget to run:
git submodule init
git submodule update
so that the plugin directories get populated.
There is an SQL file with the sample translations content in the project dir. Create the db and load it, e.g.:
rake db:create
mysql i18n_db_admin_development < i18n_sample.sql
Start the application and check out the following local pages (assuming that you aliased i18n_db_admin.local with localhost for this app):
http://i18n_db_admin.local/locales:: translator homepage
http://i18n_db_admin.local:: compare with the view template in app/views/pages/index.html.erb
http://i18n_db_admin.local/1/translations:: main locale editor
http://i18n_db_admin.local/2/translations:: translation editor
http://i18n_db_admin.local/admin/locales:: locales list for the admin
Now create another alias, so that fr.i18n_db_admin.local points to the same IP address. Visit the application at http://fr.i18n_db_admin.local and see the translations in action.
Run memcached and try the application in production mode - you will see that pretty much everything will be cached. After editing the translations, click the relevant “Reload cache” link at the locales page to make your changes visible to visitors.