XCode 4, Adding localization

孤人 提交于 2019-12-19 03:36:07

问题


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?

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:


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, ...)


来源:https://stackoverflow.com/questions/5774877/xcode-4-adding-localization

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!