Re: Determination of language codes from a locale - Unix

This is a discussion on Re: Determination of language codes from a locale - Unix ; >> I have found two class libraries that have got the method "getLanguage". >> http://www.icu-project.org/apiref/ic...0edae91f75c94f >> http://java.sun.com/javase/6/docs/ap...l#getLanguage( ) >> >> This method provides the capability to get the ISO 639 language >> code from a locale. I am looking for ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Determination of language codes from a locale

  1. Re: Determination of language codes from a locale

    >> I have found two class libraries that have got the method "getLanguage".
    >> http://www.icu-project.org/apiref/ic...0edae91f75c94f
    >> http://java.sun.com/javase/6/docs/ap...l#getLanguage()
    >>
    >> This method provides the capability to get the ISO 639 language
    >> code from a locale. I am looking for a C function that offers
    >> the same service.
    >>
    >> I know that a current setting can be queried by the function
    >> "setlocale". But I do not see a function in the POSIX API to
    >> extract ISO 639 codes from the usual naming conventions.
    >> Which is the recommended way to retrieve such information?
    >> http://opengroup.org/onlinepubs/0096...setlocale.html

    >
    > This is off-topic on c.l.c. Try comp.unix.programmer.
    > POSIX is not C.


    Can the requested functionality belong to a standard C library?

    I see the use of specific language information constants (for "nl_langinfo()")
    as another candidate to get the desired data. I find it not clear if a detail
    like codeset name adheres to an ISO standard.
    http://opengroup.org/onlinepubs/0096...anginfo.h.html
    http://www.gnu.org/software/libc/man...-Fast-Way.html

    Regards,
    Markus

  2. Re: Determination of language codes from a locale

    Markus Elfring wrote:
    >
    >>> I have found two class libraries that have got the method
    >>> "getLanguage".
    >>> http://www.icu-project.org/apiref/ic...0edae91f75c94f
    >>> http://java.sun.com/javase/6/docs/ap...l#getLanguage()
    >>>
    >>> This method provides the capability to get the ISO 639 language
    >>> code from a locale. I am looking for a C function that offers
    >>> the same service.
    >>>
    >>> I know that a current setting can be queried by the function
    >>> "setlocale". But I do not see a function in the POSIX API to
    >>> extract ISO 639 codes from the usual naming conventions.
    >>> Which is the recommended way to retrieve such information?
    >>>
    >>> http://opengroup.org/onlinepubs/0096...setlocale.html

    >>
    >> This is off-topic on c.l.c. Try comp.unix.programmer.
    >> POSIX is not C.

    >
    > Can the requested functionality belong to a standard C library?


    This is still off topic for c.l.c. Also, please do not send e-mail
    replies to things that can be handled in the newsgroup. F'ups set.

    --
    [mail]: Chuck F (cbfalconer at maineline dot net)
    [page]:
    Try the download section.

+ Reply to Thread