US/non-US localization problem
US/non-US localization problem
- Subject: US/non-US localization problem
- From: "David Hazel" <email@hidden>
- Date: Tue, 15 May 2007 17:25:10 +0100
- Importance: Normal
I hope this is the right list to try with this query, as I couldn't find one
specifically to do with localization.
I have an application which has been localized for English (non-US) and 7
other languages. I am trying to add US English to it, mainly to provide some
different support details to be displayed on some of the screens. However,
even when my system locale is set to en_US (i.e. English language and United
States format), the software continues to display the generic "en" English
text instead of the locale-specific "en_US" text.
Some background information:
- All text, including on all forms, is localized using standard
Localizable.strings files, all in their correct resource directories
- The application uses a single set of NIB files for its forms (stored in
the en.lproj directory under Resources), and the text on them, together with
all other text displayed to the user, is localised using the NSBundle method
localizedStringForKey:value:table: (forms are all localized as part of the
application start-up processing).
- The localizations for French, German, Italian, Portuguese, Spanish,
Japanese and Chinese all work fine (so there doesn't appear to be anything
wrong with the way I'm using the above call).
- I can detect the setting of my locale to en_US within the application and
react specifically to it, without any problems (so I know the current locale
is set to this at the point where the application fails to use the correct
localized text).
To make things as clear as possible, here are the folders and their contents
under the Resources folder of my application bundle:
Chinese.lproj/
Localizable.strings
en.lproj/
MainMenu.nib
InfoPlist.strings
Localizable.strings
en_US.lproj/
Localizable.strings
French.lproj/
Localizable.strings
German.lproj/
Localizable.strings
Italian.lproj/
Localizable.strings
Japanese.lproj/
Localizable.strings
Portuguese.lproj/
Localizable.strings
Spanish.lproj/
Localizable.strings
One other point: Before I began adding US English to the localizations, my
English localizations were under an "English.lproj" localization. I renamed
this localization to "en" when I first discovered that the US English wasn't
working correctly, as I thought perhaps this was what was causing the
problem. It hasn't made any difference, though.
Does anyone have any ideas why I might be having this problem? If not, is
there any way to find out what localizedStringForKey:value:table: is doing
under the bonnet (hood)? I would like to be able to find out what
localizations it thinks are present and the order in which it looks for
localized resources. It evidently isn't even seeing the "en_US" localization
file, and I would like to know why.
Thanks in advance for any help
David Hazel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden