Please look at my newly maded website, pure RoR, not used
Globalization
For translation used: xml file system…
Please look at my newly maded website, pure RoR, not used
Globalization
For translation used: xml file system…
Beate P. wrote:
Hello,
2007/9/2, alexey.Creopolis [email protected]:
Please look at my newly maded website, pure RoR, not used
GlobalizationFor 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
GlobalizationFor 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
I thinked to make mysql driven translation plugin with generator of
controller so u can translate easily… etc…
got everything almost working except time,
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.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs