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: "'Falk Hueffner'" <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Cc: "'freeciv-dev@xxxxxxxxxxx'" <freeciv-dev@xxxxxxxxxxx>
Subject: RE: [Freeciv-Dev] i18n for all eternity
From: David Pérez Serrada <dperez@xxxxxxxxxxxx>
Date: Tue, 31 Aug 1999 09:27:04 +0200


> -----Mensaje original-----
> De: Falk Hueffner [mailto:falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx]
> Enviado el: jueves 26 de agosto de 1999 23:09
> Para: Freeciv Dev
> Asunto: Re: [Freeciv-Dev] i18n for all eternity
> 
> 
> Artur Biesiadowski <abies@xxxxxxxxx> writes:
> 
> > Please stick to _/N_ (BTW, you will need Ni18n or something similar
> > also...)
> 
> Uhm, I know _(), but what does N_() do?
_() mark an strings for translation and translate it. N_() only mark the
string.

An example:

Suppose you want to tranlate the following program.

------------
char *gretting ={ "Hola", "Hello", "Egun on"};

....


 printf("Greeting: %s",greeting[i]);
-----------

You can't translate the strings in the definition of gretting cause gretting
is a constant string, so the solution is, to mark the string in the
definition
(N_() does noting, normaly N_(String) is equal to (String)), and translate
it when
the strings is called)


---------------
char *gretting = {N_("Hola"), N_("Hello"), N_("Egun on")}
.....

   printf("Greetting: %s", _(greeting[i]));
---------------


                                          Ta otra.... David

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