public
Description: Demo application including admin interface for Rails translations using i18n_db
Homepage:
Clone URL: git://github.com/yar/i18n_db_admin.git
name age message
file .gitignore Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
file .gitmodules Fri Feb 06 15:21:47 -0800 2009 removed submodule for Rails [yar]
file README.rdoc Fri Feb 06 19:27:46 -0800 2009 README update [yar]
file Rakefile Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
directory app/ Fri Feb 06 18:23:57 -0800 2009 cleaned up application.rb [yar]
directory config/ Fri Feb 06 15:14:56 -0800 2009 README in rdoc format for github, production co... [yar]
directory db/ Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
directory doc/ Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
file i18n_sample.sql Fri Feb 06 13:56:32 -0800 2009 sample sql file with translations added [yar]
directory log/ Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
directory public/ Fri Feb 06 14:21:27 -0800 2009 adding the js file that improves translation ed... [yar]
directory script/ Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
directory test/ Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
directory tmp/ Thu Aug 21 17:31:08 -0700 2008 initial import [yar]
directory vendor/ Fri Feb 06 19:25:21 -0800 2009 backend plugin update, 2nd screenshot [yar]
README.rdoc

Db-driven i18n demo app

A sample application that demonstrates usage of two i18n-related plugins:

  1. i18n_db - a Rails-2.2+ internationalization backend driven by sql and memcached.
  2. simple_loc_compat - a set of i18n helper methods that mimic those of the excellent Simple Localization plugin which stopped its development in October 2008.

In addition, this sample app contains a convenient ajaxified translations editor and a simple locale list editor.

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):

i18n_db_admin.local/locales:translator homepage
i18n_db_admin.local:compare with the view template in app/views/pages/index.html.erb
i18n_db_admin.local/1/translations:main locale editor
i18n_db_admin.local/2/translations:translation editor
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 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.