Re: [Freeciv-Dev] i18n for all eternity
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Alex Zepeda wrote:
> Essentially you create a function such as
>
> char *i18n(const char *msg)
> {
> return gettext(msg);
> }
>
> Now, I'd say use a function because functions are cheap, and it makes it
> easier to do more complex things or switch to another i18n system. You
> can use gettext (which xgettext will pick up automatically unless told not
> to) or some other things (see the info page).
>
> Then you put all the string constsants you want to be i18n'd in a call to
> the i18n function. So let's say you have:
>
> sprintf(buf, "Unit: %s %d/%d/%d");
>
> to i18n this you would simply do:
>
> sprintf(buf, i18n("Unit: %s %d/%d/%d"));
Why do you want to use i18n(..) instead of plain _() and N_() ? It is a
faster to type _(), more standard and I think more readable (as it does
not put letters before string, thus making it harder to read ).
If you worry about using different methods for i18n you can define _
function as well as i18n instead of including gettext headers. Or make
it a macro - as it is in gettext.
Please stick to _/N_ (BTW, you will need Ni18n or something similar
also...)
Artur
- Re: [Freeciv-Dev] i18n for all eternity, (continued)
- Re: [Freeciv-Dev] i18n for all eternity,
Artur Biesiadowski <=
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
|
|