开发者

Localizable.strings in German

I am localizing an app into German using Localizable.string. All well until I need to use a ü or ß type letter in the localized string.

I get an error when building.

de.lproj/Localizable.strings:0: error: validation failed: The data couldn’t be read because it has been corrupted.

Example;

"Simple introductions and alphabet" = "Einfache Begrüßungen und das Aphabet开发者_如何学JAVA";

Anyone out there with a solution? Thanks


In my case neither of the other answers fixed my problem. After spending some time with searching for help, I somehow noticed I forgot a semicolon on the end of a line. Admittedly this is a really basic error on my behalf, but the compiler could have told me my mistake instead of:

Validation failed: The data couldn’t be read because it has been corrupted.

So remember that strings table files have to be in the format

"Key" = "Localized Value goes here";


After conversation in comments the problem was solved.

If you will have similar problem then first of all you should check text encoding of file where error occurred. You can find current text encoding and change it in Xcode:

  1. Open file in Xcode.
  2. Press ⌥⌘1 (thanks @Jano)
  3. Find field Text Encoding
  4. Set it to Unicode (UTF-8)
  5. Try to rebuild the project
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜