Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

about iOS localization

In the following doc: http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/LanguageDesignations.html

it's mentioned that

In iOS, the bundle interfaces do not take dialect or script information into account when looking for localized resources; only the language designator code is considered. Therefore if your project includes language-specific project directories with both a language and region designator, those directories are ignored. The bundle interfaces in Mac OS X do support region designators in language-specific project directories.

I don't quite understand this. Does it mean that the name of .lproj directory cannot contain any region code?
But at least I know that iOS accepts zh_TW.lproj, zh_CN.lproj. How about en_GB.lproj and en-GB_GB.lproj? Or it only knows en.lproj?

like image 637
disorderdev Avatar asked Oct 11 '22 12:10

disorderdev


2 Answers

This simply means that iOS would support only two digit language codes (e.g. en.lproj, es.lproj etc.). Whereas Mac OS X will support the format Language_Region (e.g. en_GB, en_US etc.).

like image 80
VisualFrames Avatar answered Oct 19 '22 01:10

VisualFrames


I think that information is outdated. They must not have updated the Mac development docs when the iOS changes were made.

When you're creating your Localizable.strings or Project.plist file, you will create one per language or language-dialect. Just create the ones you need.

If you're using Xcode 4, be sure to show the "Utilities" (View-->Utilities-->Show Utilities) when the Localizable.strings or Project.plist file is selected. It will have a Localization section that makes adding these easy.

like image 36
picciano Avatar answered Oct 19 '22 02:10

picciano