[Top][All Lists]

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

Re: [Discuss-gnustep] Localization

From: Pascal J. Bourguignon
Subject: Re: [Discuss-gnustep] Localization
Date: Thu, 21 Sep 2000 23:00:48 +0200 (CEST)

> Date: Thu, 21 Sep 2000 11:29:55 -0500 (CDT)
> From: Jonathan Gapen <address@hidden>
> On Thu, 21 Sep 2000, Nicola Pero wrote:
> > > You then use NSBundles localizedStringForKey:value:table: method
> > > to fetch  the appropriate localized version for  each string you
> > > want to localize.
> > 
> > I don't know much about this - but - are there any plans for some simpler
> > GNUstep extension/front-end to this ?
>     There's already an easy way to do it in OpenStep; use the macro
> NSLocalizedString().  This macro takes two string arguments, first the
> string as used by the application (e.g. "Quit"), and second a description
> of it (e.g. "main menu quit item").  The macro simply returns the first
> argument if it can't load a localized version of the string, so it's easy
> to add localization support to an app by simply replacing all occurances
> of a constant string with this macro instead.
>     I had the idea a while back of creating a command-line tool that would
> scan your sources for occurances of this macro, and then create a template
> Localizable.strings file to hand off to your translators.  Of course,
> Apple beat me too it, as I noticed in their release notes that they have
> added just such a tool to MacOS X.

Have a look at my script "get-local-strings" at:


I submitted it last year, but it seems it did not make it to the tools
directory. There  already was  something like this  in NeXTSTEP,  if I
remember well.

__Pascal Bourguignon__    PGP Key ID:      0xEF5E9966
mailto:address@hidden    PGP fingerprint: 00 F5 7B DB CA 51 8A AD 04 5B 
http://www.imaginet.fr/~pjb/               6C DE 32 60 16 8E EF 5E 99 66

() Join the ASCII ribbon campaign against html email and Microsoft attachments.
/\ Software patents are endangering the computer industry all around the world.
   Join the LPF:     http://lpf.ai.mit.edu/      http://petition.eurolinux.org/

reply via email to

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