An interesting localisation issue
An interesting localisation issue
- Subject: An interesting localisation issue
- From: Simon Stapleton <email@hidden>
- Date: Thu, 21 Nov 2002 19:40:24 +0100
Hi guys & gals
This isn't really a question as such, although if someone could explain
why this happens, I'd be obliged.
I have an app which loads a bunch of functionality (well, nearly all of
its functionality, if I'm honest) from bundles. I'm happily coding
away using the NSBundle and related localisation functionality,
everything works well as long as I'm working in the development
localisation (UK English in my case, hence the correct spelling of
'localisation' in this mail ;-).
So, I localise one of the bundles, just changing a few strings to make
sure the localisation code all works OK, flip to French, run the app.
Hmmm. Still English. "What's happening?" I ask myself. Debug the
app, and sure enough, [bundle localizations] returns the expected
English,French but [bundle preferredLocalizations] returns only
English. Curious.
I start to panic, of course, despite this being the exact same code
I've successfully used all over the place, and start rewriting chunks
of code. Still no joy.
And then it strikes me. I haven't localized the app itself. I give
the main .nib file a French localisation, rebuild, fire up the app, and
Hey Presto! It all works again. Back to cvs, revert the code I just
rewrote, and it still works fine.
So, it seems to me that the localisations available for a loadable
bundle depend on the localisations available in the loading application.
Now, this isn't really a problem for me (before shipping, I'll be
localising everything) and I only noticed because I localised at the
lowest level first, but I'd be interested to know if this is how it's
supposed to work. It seems rather bizarre, to say the least.
Simon
--
PGP Key Id : 0x50D0698D
--
Eagles may soar, but weasels don't get sucked into jet engines.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.