Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] i18n for all eternity
Home

Re: [Freeciv-Dev] i18n for all eternity

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Dev <freeciv-dev@xxxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] i18n for all eternity
From: Artur Biesiadowski <abies@xxxxxxxxx>
Date: Mon, 30 Aug 1999 15:48:36 +0200

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



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