[i18n-discuss] Solaris gettext behaviour
Ienup Sung
Ienup.Sung at Sun.COM
Thu Nov 20 13:19:03 PST 2008
Thanks, Laurent, for your message and information.
As you know, thanks to Kenjiro's continuous work done, Sun gettext is
compatible with GNU gettext and has internal code conversion feature and so
as long as one prepare the MO files properly, one can use a single MO file for
multitude of locales with different codesets and encodings.
I also think that having locale links at /usr/share/locale/ does make sense
since they are solely for GNU-compatible LC_MESSAGES message files at this
point. (Later though, if some additional expenditure is needed, such top-level
linking might be a problematic but only future will tell.)
Another possibility is setting of the LANGUAGE environment variable with
compatible locales.
The best doc on this at this point from OpenSolaris side is xgettext(1),
msgfmt(1), and gettext(3C) man pages. And the source code we have at:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/i18n/
gettext.c
gettext.h
gettet_gnu.c, getext_real.c, gettext_util.c
I think that this is yet another area that we should write down a white paper
and also further work on for compatibility explained and also directory
structures for everyone to know.
Ienup
Laurent Blume wrote at 11/20/08 05:36:
> Ienup Sung a écrit :
>
>>Hello Laurent,
>>
>>I cc'd in this email Kenjiro Tsuji who owns and knows ins and outs of
>>Solaris/OpenSolaris gettext for his comment on your questions.
>>
>>I think that this might be something that relates to locale setting and
>>also the use of locales at Horde/IMP but since I'm not familiar with
>>the Horde/IMP project, I might be wrong about this and also I cannot say
>>any further. The only question that I'd like to ask is would Horde/IMP
>>relies on any configuration and/or message files and where would those
>>files go?
>
>
> Hi Ienup, good to see you can still help me around :-)
>
> They use a locale/ directory that contains only ll_CC subdirs, each
> containing LC_MESSAGES/imp.mo.
>
> They use gettext from inside PHP, so they must follow PHP's rules.
>
> That's said, I think I must be going the right way: Pidgin has the same
> issue, and I've only now found that for the version in Solaris, the .mo
> are stored in /usr/share/locale, with symlinks:
>
> drwxr-xr-x 3 root other 512 déc. 13 2006 fr
> lrwxrwxrwx 1 root root 2 juil. 26 14:44 fr_FR -> fr
> lrwxrwxrwx 1 root root 2 juil. 26 14:44 fr_FR.ISO8859-1 -> fr
> lrwxrwxrwx 1 root root 2 juil. 26 14:44 fr_FR.ISO8859-15 -> fr
> lrwxrwxrwx 1 root root 2 juil. 26 14:44 fr_FR.UTF-8 -> fr
> lrwxrwxrwx 1 root root 2 juil. 26 14:44 fr.ISO8859-15 -> fr
> lrwxrwxrwx 1 root root 2 juil. 26 14:44 fr.UTF-8 -> fr
>
> So that should do the trick neatly.
> I'd still like to have some more definitive doc on that, and also know
> about the possibility to use translations when the locale is not
> installed on the system (ie, not listed by locale -a)
>
> Laurent
More information about the i18n-discuss
mailing list