Thanks for the comments.

If requirements exist, we can look into how to provide C bindings for 
this python library later.

Regarding the coupling with system locales, the current library 
abstracts the locale source and can read the current valid locales from 
installed system or installation media or can work with a list of 
externally provided locales. The list of locales is mostly used for some 
validations (like checking if a constructed locale is valid) other than 
that this library is mostly useful as an interface for CLDR data.

The following functions in the library do support RFC3066 language tags

    def g11nsvc_get_all_system_locales(self, lang_code=None): --> 
returns all locales for lang_code
    def g11nsvc_get_all_system_utf8_locales(self, lang_code=None): --> 
Returns UTF-8 locales for lang_code
    def g11nsvc_get_all_system_legacy_locales(self, lang_code=None): --> 
Returns non-UTF-8 locales for lang code
    def g11nsvc_get_localename_from_timezone(self, timezone, lang_code, 
check_locale=True, encoding="UTF-8"): --> Contructs a locale from a 
timezone/lang code info

Regards,
Suresh

Nicolas Williams wrote:
> On Wed, Mar 17, 2010 at 11:04:47AM -0700, Suresh Chandrasekharan wrote:
>   
>> 4. Technical Description
>>
>>     Locale services library is a library for locale related information
>>     written Python planning tobe delivered to Solaris Next. Choice
>>     of Python as an implementation language for this library is
>>     influenced by
>>
>>     * A request from installer team, for inclusion in text-installer
>>       and auto installer are being re-written using python.
>>
>>     * Python's richer set of libraries and ease of coding will cut
>>       development time compared with writing these interfaces in C
>>
>>     * Though providing such a library in C may appeal to a wider set
>>       of projects, as of right now we do not have any such requirement.
>>     
>
> There's a number of projects that could greatly benefit from a C library
> (even if that were implemented using IPC to a python daemon that uses
> your python library).  For example, ssh(1) and sshd(1M) (which currently
> execute and parse the output of locale -a).  But also C implementations
> of a growing number of Internet protocols that provide globalization
> features.
>
> Also, there's a tight coupling between locale definitions and this
> library, which is a good reason to consider having this library in ON.
>
> I didn't see any functions for searching for locales given RFC5066
> language tags (and optional codeset, though in general when such a
> function is necessary one typically also cares only about UTF-8 as the
> codeset).
>
> Nico
>   

Reply via email to