bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Question of the gettext.


From: Bruno Haible
Subject: Re: Question of the gettext.
Date: Sat, 24 Apr 2010 11:50:29 +0200
User-agent: KMail/1.9.9

Hi,

Nelson Moreno Machado wrote:
> Hi please,

Please write questions about gettext to the bug-gnu-gettext mailing list, not
to me personally. Other people than you are also interested in the topic.

> How I overload my printf to understand gettext implicit, if locale defined
> in the top of the program?, is dificult?

It is not recommended to override printf like this, because looking up the
translation of a string and outputting a string a different operations.
Often a string gets translated but is not passed to printf (think of
strings in a GUI). Often strings are being output untranslated (think of
a blank line "\n" - there's nothing to translate about it).

The recommended approach is documented at
  <http://www.gnu.org/software/gettext/manual/html_node/Sources.html>

You can not expect that internationalization will be completely invisible
in the program sources. It is necessary that every string to be translated
is marked in some way. With GNU gettext, it can be done with little clutter
- just write _("some string") instead of "some string".

Bruno




reply via email to

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