Evgeny Aleksandrov
Evgeny Aleksandrov

Reputation: 779

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 related question from which I'm assuming this task is impossible.

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

Upvotes: 3

Views: 3466

Answers (3)

Kent Nguyen
Kent Nguyen

Reputation: 3232

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";

Upvotes: 1

KPK
KPK

Reputation: 467

@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...

Upvotes: 0

AlexVogel
AlexVogel

Reputation: 10621

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.

Upvotes: 0

Related Questions