开发者

Using localizable strings for specific dialects in iOS 4 [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

iPhone App Localization - English problems?

Currently, I have a localization strings file for Mexican Spanish. I do not have a plain Spanish strings file. I would like to have my app be localizable for this particular dialect of Spanish, and so in Xcode 4, I added Spanish-Mexican. I have a Localizable.strings (Spanish-Mexico) file generated by Xcode 4, with Spanish strings added. But when I go into the simulator and change the International settings to Español for Language and Mexico for region, the strings are not displayed, but the default English ones appear instead.

However, in the Simulator when I set the language to Spanish, and the Region Format to Mexico, the strings do not appear, but the plain English is displayed instead. Is there any way to support dialects in iOS 4, not just the languages that appear under Languages? There is the extensive Region Formats preference, but I'm unc开发者_开发问答ertain how it's actually used.

I understand that Locale and Dialects are two different things. But other for different formatting to represent their files (underscore vs. hyphen), how do we use them in iOS? And is Locale and Region Format the same thing?

Relevant threads with the same problem:

  • iOS localization with region (de_LU)
  • iPhone en_* sublanguage localization

Hack-y workaround: http://hamishrickerby.com/2010/07/23/iphone-ipad-localizations-regions/


Looks like it's currently unsupported:

When searching for resources in Mac OS X, the bundle interfaces take into account the user’s preferred region settings in addition to the preferred language settings. For languages that have multiple dialects, an application can specify custom resource files for each region. For example, for the English language, an application might include different sets of resource files for users in the United States, Great Britain, Canada, and Australia. By using the user’s preferred region settings, the bundle interfaces are able to return even more precisely localized content to the user. This support is available in Mac OS X only, though; in iOS, only the preferred language is taken into consideration.

http://developer.apple.com/library/ios/#documentation/MacOSX/Conceptual/BPInternational/Articles/InternatSupport.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜