Forum: Rails I18n Localisation - Looking for a straight-forward solution

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
David S. (Guest)
on 2007-01-08 16:13
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
appreciated

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
experiences?

Thanks..
David
zarni (Guest)
on 2007-02-11 12:40
David B. (Guest)
on 2007-02-11 15:49
(Received via mailing list)
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
appreciated
you would have to do that yourself.

Golly
David S. (Guest)
on 2007-02-13 12:44
Thanks god Gloc 1.2 is out:-)

It's my last hope.

Thanks...
David
David B. (Guest)
on 2007-02-13 14:07
(Received via mailing list)
Great to hear. Hope it's what you're looking for. :)

Golly
David S. (Guest)
on 2007-02-26 16:46
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?

Regards
//David
David B. (Guest)
on 2007-02-28 00:30
(Received via mailing list)
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.

Golly
David S. (Guest)
on 2007-02-28 13:42
I have no idea. Actually I'm using the RESTful versions. Therefore the
cache is organised like
<appdir>/tmp/<domain>/:resource/:id/:sub_resource/:id.cache

How can the url_for modify the cache-filename?

THX
David
David B. (Guest)
on 2007-03-02 01:50
(Received via mailing list)
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
rails.

Golly
This topic is locked and can not be replied to.