Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
572 views
in Technique[技术] by (71.8m points)

ios - Localizable.strings causing plist parsing error

I have just localized the file Localizable.strings in my Xcode project in order to localise my application to a few different languages. However, having edited each of the files in the standard "key = value" format, I receive the following parsing error, which does not specify a file making it hard to track down what it is referring to.

CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 10. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.

I have looked through each of the *.strings files, specifically on line 10, and I found nothing of any interest or regards as to what is causing the issue. Please can you tell me where I am going wrong.

Here is a sample of a Localizable.strings file in my project. All other files follow the same format.

"Enter URL" = "Voer adres in"
"Headers" = "Koppen"
"Key" = "sleutel"
"Value" = "waarde"
"Parameters" = "Parameters"
"Tap to add a new line" = "Tik om een nieuwe lijn toe te voegen"
"Perform request" = "Verzoek Uitvoeren"
"Response" = "Antwoord"
"Received Headers" = "Ontvangen Koppen"
"Error" = "Fout"
"Loading" = "Verzoek aan het versturen"

I then use NSLocalizedString() to provide the translated string.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As stated in the error message, you're missing semicolons at the end of each line.

"foo" = "bar";

Is the correct format


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...