Re: translating text
- From: Malcolm Tredinnick <malcolm commsecure com au>
- To: desktop-devel-list gnome org
- Subject: Re: translating text
- Date: Sat, 19 Oct 2002 19:20:33 +1000
On Fri, Oct 18, 2002 at 11:43:38PM -0500, Jacob Perkins wrote:
> Does text have to be enclosed in _("foo") in order to work with po
> translations for gnome2?
Or N_() or L_() or D_(), depending upon the circumstances. The basic
rules are
- if you are translating in the currently active domain and you
can call a function where the string is, use _().
- if you are translating in the currently active domain and you
cannot call a function (e.g. in arrays), use N_() to mark the
text.
The gnome-app-helper.h header from libgnomeui also defines L_() and D_(). You will rarely need to use these functions unless you are writing a library.
- if you want to translate in the domain of a particular
library, not the domain of the current application (e.g.
translate "Help" as in the .po files of libgnomeui), mark the
string with D_().
- if you want to translate the string in the current domain, if
it has a translation there, or the libraries domain otherwise,
mark the string with L_().
If all of this sounds incomprehensible to you, you probably want to read
the gettext info pages to get some background. Note that all of these
macros are just convenience definitions in bonobo-i18n.h (included by
gnome-i18n.h), but the gettext invocations are tuned to pick up strings
that are so marked.
Also, you might want to send internationalisation-specific questions to
the gnome-i18n-list.
Cheers,
Malcolm
--
Save the whales. Collect the whole set.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]