octave-maintainers
[Top][All Lists]
Advanced

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

Re: doc strings


From: Paul Kienzle
Subject: Re: doc strings
Date: Sun, 23 Feb 2003 01:26:10 -0500
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212

J.D. Cole wrote:

Has internationalization ever been considered, using GNU gettext, or the like? Would this be a good time to consider it? I suppose the main problem which a solution such as gettext would cause is separation of the documentation strings from the source files.....well, just a thought.

gettext is more for errors, warnings and the like.  In many
cases, the error message is not associated with any particular
function (e.g., errors from liboctave).

There are some tricky points about using gettext.

One is that octave is not unicode aware.  This limits
the usefulness of  i18n to European languages.

Another is that word order is not the same in all
languages, so if you are building up your strings piece
by piece (as cout demands) gettext may not give a very
good result.  Fortunately, most messages are handled
through error() or warning() which use the more convenient
printf formatting.

Don't forget to wrap the messages inside m-files as well.
Normally I would suggest _('hello') but _ is not an allowed
function name in matlab.  Maybe i18n('hello')?

There are lots of little issues, such as code that appends an
's' to a string only if it is needed.  I don't know that octave
has a lot of these.

Also, there is the question of whether the keywords of
the language can be translated.  Other projects have gone
a long way toward i18n.  If you are interested, you should
check out, e.g., http://www.python.org/sigs/i18n-sig/

Paul Kienzle
address@hidden



reply via email to

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