Zonily Jame
Zonily Jame

Reputation: 5379

Swift Thai Localization Problems

There seems to be a problem with the String library that apple uses.

Here's my Localizable.strings

"error_failed_to_retrieve_certificate" = "เกิิดผิดพลาดในการกู้คะแนน";

Here's how I set it to any view

anyView.text = return NSLocalizedString("error_failed_to_retrieve_certificate", comment: "")

But somehow the string that is being displayed gets warped, when it gets displayed, (the second character becomes different.

Here's what it looks like too when I search it using the Project Search.

enter image description here enter image description here

But on the Strings it looks different (notice the third character)

enter image description here

Here's one image that is side by side

enter image description here

Upvotes: 3

Views: 701

Answers (2)

Sweeper
Sweeper

Reputation: 273540

Note that I don't know any Thai.

It seems like that your string has an extra ิ (U+0E34 THAI CHARACTER SARA I) in it. The character before that, กิ, is already two code points combined - ก (U+0E01 THAI CHARACTER KO KAI) and ิ, so the extra ิ got displayed alone. I would say it's an Xcode bug.

I've removed the extra character here:

เกิดผิดพลาดในการกู้คะแนน

Copy and paste that and it should be fine.

Upvotes: 1

Anji Mendpara
Anji Mendpara

Reputation: 90

You need to check if you have unique key "error_failed_to_retrieve_certificate". this key value is unique.

Upvotes: 0

Related Questions