discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Localisation of Frameworks


From: Wolfgang Lux
Subject: Re: Localisation of Frameworks
Date: Fri, 15 Jan 2016 14:13:43 +0100

> Am 15.01.2016 um 13:15 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:
> 
> Hello,
> 
> thanks to Bertrand, I am spurred to improve localisation of our Apps. For 
> non-english users it enhances the experience quite a bit!
> 
> GWorkspace is localized with this method
> - There is one English GORM file
> - The controller has an IBOutlet for every text/title/label
> - there are many Localizable.strings for every language, English itself 
> included
> - On initialization, every text is localized using _(@"key) or 
> NSLocalizedString(@"key", @"")
> 
> This is quite tedious but works quite fine nad has the advantage of having 
> only 1 Gorm file.
> 
> First, any real difference or preference between _(@"key) or 
> NSLocalizedString(@"key", @"") ? The former is a GS Macro.
> 
> The same architecture is done also in supporting Frameworks (e.g. FSNode). 
> However, there, localization does not seem to work.
> I suppose the strings in the Framework should work and be used, right? 
> Otherwise if a Framework were to be used by a different application it would 
> translate differently. I get no translation.
> Also if the translation is put in the app, it doesn't work either.

I would assume that within a framework you should be using 
NSLocalizedStringFromTableInBundle instead of NSLocalizedString.

Wolfgang




reply via email to

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