Hi Roland,

I'm trying to comprehend the message you sent since I wasn't following
up the thread. One thing though I can tell you right now is that
usual messaging (whether that is using gettext or X/Open catalog) relies on
system interfaces and default locations of translated messages as you
know as described in the gettext(1), gettext(3C), environ(5), and so on
man pages.

As a possible reference to your #3, GNU-compatible gettext(3C) allows
multiple locales using a single message file and some other convenience
stuff as descried in the gettext(3C) man page and also:

http://www.gnu.org/software/libc/manual/html_node/Charset-conversion-in-gettext.html

You can also specify what would be the content type in the PO file with
something like:

msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"

I'm not quite sure if we have any URLs/tutorials on script I18N.
I think I saw once or twice in the past but cannot rememeber the URL
to it... I cc'd Michael in this email if he could rememeber that and
point to us.

Ienup

Roland Mainz wrote at 11/12/06 19:23:
> David Korn wrote:
> [CC;'ing Ienup Sung&&i18n-discuss at opensolaris.org to get their attention
> and feedback]
> 
>>>Can I set the name of the message catalog name to an alternate value?
>>
>>The message catalog name is the name of the script.  If there
>>is a need to be able to name the catalog, then we can add
>>a shell special variable, (.sh.msgcat) to override this default.
> 
> 
> I looked a little bit closer at the problem and found some issues:
> 1. ksh93 seems to have a concept of a "program name", used for the
> message catalog and things like the "getopts" (which can be overridden
> via the "-a" option) - it may be nice to have a way to override this
> "program name" globally, for example via $ .sh.progname="myapp" #
> 
> 2. The message catalog name should be setable to a fixed name as
> applications may be installed under multiple names (e.g. similar like
> "rksh" and "ksh" which use the same catalog) and/or to avoid that the
> catalog has to contain a site-specific suffix for shell scripts (e.g.
> the message catalog for "gnaw.ksh" should not require a ".ksh" suffix)
> ... the idea to introduce ".sh.msgcat" sounds good (but I would prefer
> ".sh.msgcat.name" (that .sh.msgcat.* can be used as basis for all
> localisation-related variables)).
> 
> 3. There should be a way to define an locale for message catalogs
> (overriding of ${LANG}(${LC_MESSAGES}). Some scripts may use multiple
> locales in parallel (for example my dumb RSS reader
> (http://svn.genunix.org/repos/on/branches/ksh93/gisburn/scripts/rssread.ksh)
> which switches to en_US.UTF-8 to process the RSS data (from RSS/XML to
> plain text) since these data are encoded in UTF-8) but the message
> catalog should only be in one locale. Therefore it may be nice to have
> something like ".sh.msgcat.locale" to set the locale of the message
> catalog explicitly (and independently of ${LANG}/${LC_MESSAGES}).
> 
> Ienup:
> Do you have some URLs to Solaris scripts which are localised in the one
> or other way that we can take a look whether there are other things
> which may be required for localisation ?
> 
> ----
> 
> Bye,
> Roland
> 

Reply via email to