Re: [Freeciv-Dev] i18n for all eternity
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Falk Hueffner wrote:
>
> Uhm, I know _(), but what does N_() do?
_(txt) does two things - first it is recognized by xgettext and in
program is replaced with call to gettext() (or whatever it is called - I
do not remember). N_(txt) is only spotted with xgettext and not
translated explicitly.
It is useful in tables which have to be constant at compile time (even
non-constant table can have problems as initialization order can be
incorrect) . Other uses include for example marking menu names - if you
want some config files to use untranslated menu name you can do
something like this
addMenu(N_("File"));
void addMenu(const char * origName)
{
const char * translated = gettext(origName);
menu = reallyAddMenu(translated);
registerMenu(origName, menu);
}
Etc, etc.
Artur
Re: [Freeciv-Dev] i18n for all eternity, David Pérez Serrada, 1999/08/26
Re: [Freeciv-Dev] i18n for all eternity, David Pérez Serrada, 1999/08/26
RE: [Freeciv-Dev] i18n for all eternity, David Pérez Serrada, 1999/08/31
|
|