PIXEL
DOCK

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 | 4 Comments »

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

Then I got this error from Xcode:

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:

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

4 Comments

  • 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,

    Jörn

  • 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!


Leave a Reply