NSBundle and localization question?
NSBundle and localization question?
- Subject: NSBundle and localization question?
- From: Steve Moon <email@hidden>
- Date: Wed, 21 Nov 2001 08:14:31 -0800
Hi
my app is using some custom bundles : so loaded dynamically to add
feature to the app.
Those bundles are loaded by the app when needed and show up some windows
and messages. The application need to support various languages, so I
extracted all the strings from my bundles using genstrings (my code use
all over the place : NSLocalizedStringFromTableInBundle()). The
localized file name is not the default one "Localizable.strings" but my
own name which I reference correctly in
NSLocalizedStringFromTableInBundle, example :
NSLocalizedStringFromTableInBundle(@"Error", @"Bundle1.strings",
[NSBundle bundleForClass:[self class]], @"Error title");
My problem : if I launch my application with another language (not
english), the main application show up correctly in this language but
all my bundles always show up the English text. It looks like the
localized strings are never pull up from their appropriate localized
files !! Is it a known bug ? Any workaround ?? Anything I am doing
wrong ???
Thank
Steve!
PS: if I ask the bundle for the path for the resource "Bundle1.strings"
it return the appropriate localized path... so it really looks like
NSBundle can't pull up the localized value if it's not the main bundle.