We have key-value pair in Localization.string file.
"spanish-key" = "Espa\u00f1ol";
When we fetch and assign to label then app displays it as "Espau00f1ol".
Doesn't work.
self.label1.text= NSLocalizedString(@"spanish-key", nil);
It works- shows in required format.
self.label1.text= @"Espa\u00f1ol";
What could be the problem here when we use
NSLocalizedString(@"spanish-key", nil)?
If we set \U instead of \u, then it works.
"spanish-key" = "Espa\U00f1ol";
When to use "\Uxxxx" and "\uxxxx"?
Just write the string in proper Unicode in Localization.string.
"spanish-key" = "Español";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With