Localisation - Looking for a straight-forward solution

Hello there.

I’m looking for a localisation plugin that is:

  • easy to use (like java’s ressource bundle for instance)
  • flexible enough*
  • fast
  • well documented

*My requirements in detail:

  • I want to take care of my database schema on my own (don’t want a
    autom. handling like globalize)
  • It should not torture my database; a file-based solution (with caching
    in memory) would be appreciated
  • Multiple languages per site required - but not necessarily per page
  • nice to have: The choise of the active language for a request should
    be up to me; not handled automatically
  • Unicode should be possible
  • Rails 1.16, 1.2 compatible
  • should work with fragment/action/page caching
  • would like to have a routing like: site.com/:lang/:controller/:action
  • translation of rails error messages and stuff
  • translation of model and attribute names (in error messages) would be

However I’m still not sure if it’s preferable to have multiple rhtmls
per language or to have just one with multiple calls to something like
“getText(XXXX)”. I could image that the multiple rhtml-solution is more
flexible and possibly faster. What do you think or what are you


I’m using this, works.


Hi. Sounds like GLoc would be a good fit for those requirements.
However regarding the points:

  • translation of rails error messages and stuff
  • translation of model and attribute names (in error messages) would be
    you would have to do that yourself.


Thanks god Gloc 1.2 is out:-)

It’s my last hope.


Great to hear. Hope it’s what you’re looking for. :slight_smile:


Yes, indeed. k Thnx!!

However I have one thing that is in conflict with my requirements: As I
can see it does not work with caching very well.

Do you use caching in your web-apps?


I have no idea. Actually I’m using the RESTful versions. Therefore the
cache is organised like

How can the url_for modify the cache-filename?


Hi. Yes, I’ve used it with caching without any problems. You know how
you use a url_for style hash to identify the cached filename, just add
:lang => current_language to it.


You’ll have to look up the rails api or google it but i remember that
methods like cache(), expire_fragment(), cache_page() accept url_for
params. I’d give u more help but I’ve been programming in Java for the
last month or two so it feels like a while since I touched ruby on


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs