[Rails] Re: Re: GetText: Works with en_GB and en_US, but doesn't wi

Grzegorz Daniluk daniluk at yahoo.com
Thu Feb 9 13:47:48 GMT 2006


> Ruby-GetText-Package doesn't depend on the system locale.
> If you have a translated po file in po/#{lang}/ correctly,
> it will be shown the language even if your server doesn't support your 
> locale.

OK I understand. I guess that there is something wrong with my gettext 
package configuration. Please look below, I execute the hello.rb 
example:

greg at gdcomp:~/tmp/samples$ ls locale/
cs  de  el  es  fr  it  ja  ko  nl  pt_BR  sv

greg at gdcomp:~/tmp/samples$ LC_ALL=de_DE.utf8 ruby hello.rb
Hallo Welt
greg at gdcomp:~/tmp/samples$ LC_ALL=ko_KR.utf8 ruby hello.rb
Hello World
greg at gdcomp:~/tmp/samples$ LC_ALL=sv_SE.utf8 ruby hello.rb
Hello World
greg at gdcomp:~/tmp/samples$ LC_ALL=sv_FI.utf8 ruby hello.rb
Hello World
greg at gdcomp:~/tmp/samples$ LC_ALL=cs_CZ.utf8 ruby hello.rb
Ahoj Světe

greg at gdcomp:~/tmp/samples$ locale -a
C
cs_CZ.utf8
de_DE.utf8
en_US.utf8
es_ES.utf8
fr_FR.utf8
hu_HU.utf8
it_IT.utf8
ja_JP.utf8
pl_PL.utf8
POSIX
pt_PT.utf8
ru_RU.utf8
zh_CN.utf8

after adding ko_KR.UTF-8 UTF-8 to /etc/locale.gen and executing 
locale-gen (Ubuntu 5.10 linux disto)
greg at gdcomp:~/tmp/samples$ LC_ALL=ko_KR.utf8 ruby hello.rb
안녕 세상

Works. I guess that there is a different way of changing a lang to use 
by hello example.

Regards,
GD

-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list