4
votes

I have just moved to xcode4 and boy am i confused! :)

For one, in the screenshot, you could see the localizable strings, a couple of the file names changed to "null", i am wondering why and if it would effect the final product?

And also, i could'nt figure out for the life of me, how do i add another localization. Previously in xcode3.x i had to right click on "Localizable Strings" and add a language, where do i do it now? enter image description here

Update: I have found where to add locations, but again, previously i was able to type a language the way i wanted, for instance, i want to add spanish, i could do that by just adding a language with name spanish, but now i am forced to choose from a predefined list of languages. And also, the ((null)) bugs me

1
Thanks, but my question about the ((null)) still bugs me :) and also, do i have to change my code? i was using strings like "HongKong" to identify my language previouslyVeeru
I have no idea about anything else, sorry I can't help :DVervious
That's okay, i kinda had to delete those ((Null)) recreate the language files with apple provided file name format. Previously my language files are custom named, something like, taiwanchinese, but now xcode forces to use names such as Chinese -TaiwanVeeru

1 Answers

-1
votes

The languages will be read from NSGlobalDomain's AppleLanguages. Try to add your own identifier to that list.

% defaults read NSGlobalDomain AppleLanguages
("en_GB", en, fr, de, ...)
% defaults write NSGlobalDomain AppleLanguages "(HongKong, "en_GB", en, fr, de, ...)"
% defaults read NSGlobalDomain AppleLanguages
(HongKong, "en_GB", en, fr, de, ...)