cocoa touch - Does iOS Look for Region-Specific .lproj Directory (e.g. en_US.lproj)? -


according official document internationalization programming topics:

if mac app had localizations united states, great britain, , australian users, bundle routines search appropriate region directory (en_us.lproj, en_gb.lproj, or en_au.lproj) first, followed en.lproj directory. the same application on iphone in en.lproj directory.

but tried put localizable.strings in en_us.lproj directory, not en.lproj, still can find string in english using nslocalizedstring() function.

what's problem?

i'm not sure, here's educated guess.

first thing recognize os x , ios share large amount of code. can find quite few features officially os x - only, work on ios, too.

here's observed on phone:

if had

- en_us.lproj     - localizable.strings 

then, read value file, contradicting documentation found says (as noted).

however, if had:

- en_us.lproj     - localizable.strings - en.lproj     - localizable.strings 

then, take value en.lproj, sort of respecting spirit of documentation.

now, when use xcode, graphically, let me choose localization en-us, not same thing en_us (us region). so, i'm guessing (like me), went outside of xcode, added en_us.lproj directory manually, later added xcode project.

perhaps thinking of apple although ios can still recognize en_us.lproj, since they've configured xcode not allow directly create localization, apps won't wind there? so, you've hacked way (kind of) feature.

one more note: if did did, , manually created .lproj folders, have careful when change them around, outside of xcode, they're gone when think are. also, may have uninstall app blow away old .lproj directories added (and deleted) in way. so, that's 1 more way see strange behaviour.

long story short, documentation is, wouldn't submit app type of localization app store. might either rejected, or break (not find string value) in future, since it's not officially supported on ios. said, wouldn't surprise me if feature continued work indefinitely.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -