discuss-gnustep
[Top][All Lists]
Advanced

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

Re[2]: Localisation of Frameworks


From: Andreas Schik
Subject: Re[2]: Localisation of Frameworks
Date: Fri, 15 Jan 2016 23:18:16 +0300


Freitag, 15. Januar 2016, 18:37 +0100 von Riccardo Mottola <riccardo.mottola@libero.it>:
Hi,

Wolfgang Lux wrote:
> I would assume that within a framework you should be using NSLocalizedStringFromTableInBundle instead of NSLocalizedString.

that sounds sensible. I suppose that _() is a shorthand for
NSLocalizedString with a nil parameter.
Yes.

NSLocalizedString uses mainBundle, which is the App executable bundle.

How do I get a Frameworks's bundle path? I suppose bundleForClass with
the current Class should do.
Yes.

But what about table? I suppose nil should work: that is what
NSLocalizedString passes according to the doc.

NSLocalizedString(@"key", @"")
becomes
NSLocalizedStringFromTableInBundle(@"key", nil, [NSBundle
bundleForClass:[self class]], @"")

I ask, because it doesn't seem work :)

In the backend bundles for Burn I use the following:

[[NSBundle bundleForClass: [self class]] localizedStringForKey:@"key" value:@"" table:nil]

Frameworks should not differ from bundles, I'd think.

Andreas

reply via email to

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