I like the smell of Swift in the morning…

Localizable.strings error: “The data couldn’t be read because it isn’t in the correct format”

Posted: | Author: | Filed under: Objective-C, Swift, Xcode | 6 Comments »

I added some new keys to my Localized.strings files:

"HOME_TEAM" = "Home team"
"AWAY_TEAM" = "Away team"

Then I got this error from Xcode:

Read failed: The data couldn't be read because it isn't in the correct format

It took me a minute but when I found what caused the error I had to smile. I simply forgot the semicolons at the end of each line:

"HOME_TEAM" = "Home team";
"AWAY_TEAM" = "Away team";

Those poor semicolons! Coding in Swift really makes you forget they even existed in the first place 😉


  • 1

    Davidsaid at

    Hi Jorn! If you are dealing with the translation of strings, my suggestion is to try a software localization tool with a flexible and user friendly work interface, where you can invite your localization team to work on the translation projects.

  • 2

    Jörnsaid at

    Hi David,

    thank you for your comment! Yes, I would definitly use a localization tool for bigger projects. To be honest, this post was only half-serious. Just a little obituary for the semicolon character which seems to go extinct with the advent of Swift…

    Best regards,


  • 3

    Riyan Pratamasaid at

    Bonjour, Joern!
    You literally saved my time. I am dealing with this problem few hours, and it turns out into missing semi colons.
    Just a little question, you said that you’ll use localization tool for big project. What tool do you use? I am waiting your answer on my email.
    Thank you so much.

  • 4

    J Smithsaid at

    Thanks for the help!

  • 5

    namesaid at

    thanks bro

  • 6

    Elon Marksaid at

    This tool can help solve this problem, just select your localizable.strings file, it will help you find out which line format is wrong, it can save a lot of time


Leave a Reply