Look ma ! :)

Please look at my newly maded website, pure RoR, not used
Globalization :slight_smile:

For translation used: xml file system…

http://www.yulia-site.org

Beate P. wrote:

Hello,

2007/9/2, alexey.Creopolis [email protected]:

Please look at my newly maded website, pure RoR, not used
Globalization :slight_smile:

For translation used: xml file system…

Very nice! Could you say a little bit more, how you realised this?

Beate

go il !

Hello,

2007/9/2, alexey.Creopolis [email protected]:

Please look at my newly maded website, pure RoR, not used
Globalization :slight_smile:

For translation used: xml file system…

Very nice! Could you say a little bit more, how you realised this?

Beate

For translation used: xml file system…

Could you talk a bit more about how/why you did the localisation this
way?

Cheers

Tim

in rails_root i have “langs” folder that contain, en.xml, ru.xml …
etc, mean can contain any language…

In site admin there is language controller that can add new language,
like name, code (2 letters like “en” < this will be name of flag (in
images) and name of xml file).

in xml structure are like this:

<?xml version="1.0" encoding="cp1251" ?> ïÄÉÎ îÁÖÍÉÔÅ ÔÕÔ

in application.rb there is before_filter to init language… from lib/
language.rb
language.rb is exttending String class so if you want to put
translated string make <%= “One”.tr %>

In application.rb there is preloader for all current language strings,
if no translation was given for “ru”, then it use “en” as default…
If <%= “This is not exist”.tr %> string not exist - everything will
fall :slight_smile:

I thinked to make mysql driven translation plugin with generator of
controller so u can translate easily… etc…
got everything almost working :slight_smile: except time,

btw:
http://www.botvector.net

On 2 ÓÅÎÔ, 20:31, Tim P. [email protected]

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