discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnustep] Localization


From: Nicola Pero
Subject: Re: [Discuss-gnustep] Localization
Date: Thu, 21 Sep 2000 21:22:18 +0200 (CEST)

> How about this -
> 
> #define _(X)    \
> [[NSBundle mainBundle] localizedStringForKey: @#X value: nil table: nil]
> 

Nice.  What about 

#define @_(X)     \
[[NSBundle mainBundle] localizedStringForKey: @#X  value: nil  table: nil]

My concern is that - since gettext is used everywhere and it's a big
standard - for some reason someone might need to compile his tool or app
linking with both gnustep base and gettext - in that case we should avoid
clashing.  For example, someone wanting to write a gnome app in
objective-C and using the gnustep base libraries.  Strange but why not.

In this case you would write 

NSString *myString = @_("myString");

Well, really not sure, perhaps someone has a better idea.

Eg, would 

NSString *myString = @@("myString");

make sense ?

> I agree we should extend the OpenStep API to add a standard one for use in
> GNUstep (unless Apple have already done this, in which case we might want to
> use their extension).

Probably if we add only a single very simple and easy inline
function/macro, macosx compatibility could simply be achieved by including
the definition of the inline function/macro (if not yet defined) in any
project using it and wishing to be cross-platform. 

> > And then to translate everything into Russian, you just write the
> > Localizable.strings file and put everything into Russian.lproj and that's
> > it (we still need a better guess of the languages from the environment in
> > NSUserDefault but I'll take care of that as soon as I have the time - the
> > biggest work is that we probably need a big table translating the ISO
> > codes used in gettext to the GNUstep language names).
> 

> I suppose that's a good idea if we want to run in a Gnome environment.

Well, the fact is that everything on a GNU system is using gettext, not
only gnome.  It's important that the user sets his locale preferences only
once, so we need to be able to recognize gettext preferences too.  Btw, -
perhaps our preferences app should be able to *set* the gettext
preferences too perhaps, so that not-GNUstep apps can be run in the
correct locale even in a GNUstep environment. 



reply via email to

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