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
:
- Open file in Xcode.
- Press ⌥⌘1 (thanks @Jano)
- Find field
Text Encoding
- Set it to
Unicode (UTF-8)
- Try to rebuild the project
精彩评论