开发者

Choosing localization for unsupported languages

I have localizations for "en" and "ru" languages, and if user select any other language (fr,de...) I need to display Russian localization variant. I tried changing "Localization native development region" in info.plist to "ru" / "Russian", but it always displays English, when using unsupported language. There is rel开发者_开发百科ated question from which I'm assuming this task is impossible.

I would be grateful for any advice and insights on these issues.


I think with my solution posted here

Localizing strings in iOS: default (fallback) language?

It is possible to set any non-English as default too. Even if the current device is not set to be using that language (eg. Russian).

You can use [UIImage imageNamed:L(@"AN_IMAGE")]

Then in different Localizable.strings file, set to different values:

"AN_IMAGE" = "some_image_default.png";
"AN_IMAGE" = "some_image_ru.png";
"AN_IMAGE" = "some_image_pt.png";


Do you have read String Resources from Apple how to create a Localizable.strings file for every needed language. You can use than NSLocalizedString to enter the localized string to every needed file and don't have to translate every file.


@Condor:

I have similar issues you have had with localized pictures with localized XIB files. They show up fine with the translation in XCode and my app works well with localization in the Simulator. It's just on the device where I always see plain english for the XIB parts... (All copy translated with NSLocalizedString() works fine on the simulator.

Took the smallest possible example project and implemented similar folder structure there - no problem...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜