From mutoh at highway.ne.jp Sat Jan 14 10:51:13 2006 From: mutoh at highway.ne.jp (Masao Mutoh) Date: Sun, 15 Jan 2006 00:51:13 +0900 Subject: [gettext-u-en] [ANN] Ruby-GetText-Package-1.1.1 Message-ID: <20060115005113.5ac1567c.mutoh@highway.ne.jp> Hi, Ruby-GetText-Package-1.1.1 is now available. And also screenshots page is available. It's a sample Rails blog in 10 language. Check it out! http://www.yotabanana.com/hiki/?ruby-gettext-screenshot -- .:% Masao Mutoh From donald.piret at synergetek.be Sun Jan 15 13:54:40 2006 From: donald.piret at synergetek.be (Donald Piret) Date: Sun, 15 Jan 2006 19:54:40 +0100 Subject: [gettext-u-en] Ruby on rails GetText overriding locale selection Message-ID: <43CA9A70.3080904@synergetek.be> Hello everybody, Ok I'm not sure whether this is a new feature request or whether I just don't know how to do this. If I understand correctly, the way to override the automatic locale selection order ("the parameter of bindtextdomain" > "lang" value of QUERY_STRING > "lang" value of Cookie > HTTP_ACCEPT_LANGUAGE value > "en") is to call GetText.bindtextdomain with the appropriate locale in the module. In Rails however you initialise GetText by calling the init_gettext method either in each controller or in the application controller to set it in every controller. The init_gettext however does not have a parameter for overriding the locale. Is there a way to still do this? Am I missing something very obvious or is this just missing for the moment? Thanks a lot in advance, Donald Piret -------------- next part -------------- A non-text attachment was scrubbed... Name: donald.piret.vcf Type: text/x-vcard Size: 299 bytes Desc: not available Url : http://rubyforge.org/pipermail/gettext-users-en/attachments/20060115/d634c735/donald.piret.vcf -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3206 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/gettext-users-en/attachments/20060115/d634c735/smime.bin From mutoh at highway.ne.jp Mon Jan 16 09:45:25 2006 From: mutoh at highway.ne.jp (Masao Mutoh) Date: Mon, 16 Jan 2006 23:45:25 +0900 Subject: [gettext-u-en] Ruby on rails GetText overriding locale selection In-Reply-To: <43CA9A70.3080904@synergetek.be> References: <43CA9A70.3080904@synergetek.be> Message-ID: <20060116234525.7e472602.mutoh@highway.ne.jp> Hi, On Sun, 15 Jan 2006 19:54:40 +0100 Donald Piret wrote: > Hello everybody, > > Ok I'm not sure whether this is a new feature request or whether I just > don't know how to do this. > If I understand correctly, the way to override the automatic locale > selection order ("the parameter of bindtextdomain" > "lang" value of > QUERY_STRING > "lang" value of Cookie > HTTP_ACCEPT_LANGUAGE value > > "en") is to call GetText.bindtextdomain with the appropriate locale in > the module. > In Rails however you initialise GetText by calling the init_gettext > method either in each controller or in the application controller to set > it in every controller. > The init_gettext however does not have a parameter for overriding the > locale. > Is there a way to still do this? Am I missing something very obvious or > is this just missing for the moment? New init_gettext is a covenient function. You still use old way (calls bindtextdomain directly) But I think it's easier to call GetText.locale=(loc) before calling init_gettext. require 'gettext/rails' class ApplicationController < ActionController::Base GetText.locale = "fr_FR" init_gettext "blog" end -- .:% Masao Mutoh