freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FR-devel] ruby-locale -- Can we use this in our i18n support?


From: vruz
Subject: Re: [FR-devel] ruby-locale -- Can we use this in our i18n support?
Date: Tue, 3 Dec 2002 16:41:51 -0300

I will have a look at it

Locale not only refers to language internationalization
but also to other idiosyncracies like date format, 
currency, etc.

cheers,

vruz



----- Original Message ----- 
From: "Curt Hibbs" <address@hidden>
To: "Freeride-Devel" <address@hidden>
Sent: Tuesday, December 03, 2002 8:22 AM
Subject: [FR-devel] ruby-locale -- Can we use this in our i18n support?


> Is this something that we can use as part of our eventual i18n support?
> 
> Curt
> 
> -----Original Message-----
> From: Rob Blackbourn [mailto:address@hidden
> Sent: Tuesday, December 03, 2002 1:32 AM
> To: ruby-talk ML
> Subject: [ANN] ruby-locale-0.1
> 
> 
> This is the first version of ruby-locale (0.1) which can be found at;
> http://sourceforge.net/projects/ruby-locale/
> 
> This is my first Ruby extension (so be on your guard:-). As well as its 
> functions it provides an example of how to read and write hash tables in 
> Ruby extensions.
> 
> ruby-locale is a Ruby ext which provides bindings for setlocale(3) and 
> nl_langinfo(3).
> 
> require 'locale'
> Locale.setlocale(Locale::LC_ALL, 'en_US')
>    # "en_GB"
> Locale.setlocale(Locale::LC_TIME, 'en_GB')
>    # "en_US"
> Locale.setlocale(
> Locale::LC_TIME => 'en_GB',
> Locale::LC_MONETARY => 'en_US')
>    # {2=>"en_GB", 4=>"en_US"}
> Locale::LangInfo.langinfo(Locale::LangInfo::D_T_FMT)
>    # "%a %d %b %Y %T %Z"
> 
> Locales are not very object oriented.Once set they apply globaly. 
> However, having the locale definition in a hash does allow us to pass 
> around the definition.
> 
> Rob Blackbourn
> 
> 
> 
> 
> 
> _______________________________________________
> Freeride-devel mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/freeride-devel
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]