3

I'm trying to localize Main.storyboard, localization doesn't work.

I have files:

Main.storyboard |--Main.storyboard (Base) |--Main.strings (Russian) |--Main.strings (English)

In russian .strings file I wrote something like

/* Class = "NSButtonCell"; title = "rus-example"; ObjectID = "0XB-XT-cHW"; */
"0XB-XT-cHW.title" = "rus-example";

In Main.strings (English) (for the same button):

/* Class = "NSButtonCell"; title = "en-example"; ObjectID = "0XB-XT-cHW"; */
"0XB-XT-cHW.title" = "en-example";

When I run the app on English OS, I get the same result, when on Russian.

I turned on "Show non-localized strings" feature in Xcode, it shows all strings as non-localized.

How can I enable localization?

supertrall
  • 115
  • 1
  • 1
  • 7

1 Answers1

4

A little late, but maybe someone else will come across this post: I had the same problem for my german localisation. Running

plutil Main_iPhone.strings

did the trick for me. It showed up the following output:

Main_iPhone.strings: Unexpected character / at line 2

Even if this was a misleading error (the localisation file starts with a comment, that's ok), it pointed me in the right direction: there was something wrong with the localisation file itself.

Long story short: missing quotation mark or rather semicolon, but unfortunately you don't see this error within Xcode.

However, just run the plutil command on your localisation string files and check the output.