Danish localization broken in iOS 8? - ios

I've seen other threads about the simulator, but I'm experiencing a 90% break which is nothing short of miraculous.
Our app is localized in 5 languages. All of them work perfectly, except Danish.
Only certain words are translated, even though all of them use the shortcut "NSLocalizedString". Also, the BarButtonSystemItem "Back" and "Cancel" both work.
The symptoms are exactly the same in the simulator, device, iOS 7 & 8. I've also tried both "Danish" (da) and "Danish (Denmark)" (da-DK) in different combinations.
Is anybody else experiencing weird localization issues like this?

I knew it would be a stupid bug, but this one takes the prize.
In the danish Localizable.strings file, an EMPTY ROW had a SPACE CHARACTER in it.
I'm not kidding.
This made the app find all the translations up to the space character, then nothing after it... OMG what a stupid parsing error bug from Apple.
File a bug anyone? facepalm

Related

What's the difference between iOS 12 and iOS 13 when it comes to including emoji via its code point

Before we start, I'd like to clarify...
This question isn't about how to include emoji on labels. I'm aware that has been asked and answered before. I am able to get the emoji on the label just fine.
This question isn't about whether we can/should include emoji on labels. I am aware of the issues around that too. We'll discuss as a team whether we want to proceed with emoji, but it doesn't make me any less curious about the issue below.
With the disclaimers out of the way, our situation is as follows: We have an iOS app that deploys back to iOS 12. In it, we'd like to include the warning sign on a UILabel to signal certain situations. The text of the label comes from this bit of code (including picture, because pasting emoji doesn't come through):
This line isn't setting someLabel.text directly but it's the relevant bit. I can promise you that surrounding code simply prepends this snippet to other text and slaps it onto a label.
The first character of that literal string at the end of the line is the "warning sign" emoji inserted into the source code via hitting Ctrl+Cmd+Space and choosing it from the resulting picker. Then we have the unicode code point \u26A0.
I get the following when this code runs:
At this point I'm really curious about...
What changed between iOS 12.4 and 13.7 such that the same source code produces different output? Was the different treatment of unicode code points announced somewhere on some release notes?
Is one side somehow "more correct"? Does the "yellow-triangle-with-black-exclamation-in-it" symbol and \u26A0 technically represent different things, iOS 12 mistakenly visualized them as the same, and iOS 13 fixed that issue? Or vice versa; they are actually meant to represent the same thing, iOS 12 did so, and iOS 13 broke something? Or does the concept of correctness not even apply, since they are different representations?
Is there any code point I can type into my source file (e.g. \u<something>) that will render as the yellow-triangle-with-black-exclamation-in-it emoji consistently on iOS 12 and later? If so, what is it? If not, is using the actual emoji in my source code the only way to achieve this?
There are two variants, 26a0fe0f and 26a0fe0e. The former is the emoji variant; the latter is the text variant. In iOS 13 you are using both of them. I don't know why it chooses the second one as a fallback in iOS 13 but the first one as a fallback in iOS 12; the iOS 13 behavior seems more correct to me.
I think I figured it out, but leaving question and answer up in case it helps others.
The crux of the issue is that the "yellow-triangle-with-black-exclamation-in-it" symbol and the "black-bordered-triangle-with-black-exclamation" symbols are not the same entity. We see these in the character viewer built into macOS:
And sure enough, the representation \u26A0\uFE0F renders as "yellow-triangle-with-black-exclamation-in-it" on both iOS versions:
If \u26A0 wasn't supposed to be the "yellow-triangle-with-black-exclamation-in-it" emoji, I still can't explain why it renders as such on iOS 12...
Credit actually belongs to user matt. He had a comment which hinted at these being different, which led me down this path. The comment is no longer there for some reason (got deleted?) so I don't know how to properly attribute.

Enabling Double Length Pseudolanguage doesn't work in Xcode 7.3

I'm trying to use the Double Length Pseudolanguage to test potential layout problems with other languages. I've enabled Application Language -> Double Length PseudoLanguage in scheme editor but when I run the app in the simulator, none of the strings were doubled. I've tried preview editor in Storyboards and the strings stayed the same.
FYI: I have localized my app to two languages already, I have a Base language (English) and pt-br (Portuguese). All of my hardcoded strings were changed in code to use NSLocalizedString.
Try testing it on a real device.
Looks like this is a bug of the simulator on newer versions of Xcode.
This might sound completely unrelated to the topic, but believe me, I read the question correctly.
If you use AFNetworking pod, go to AFURLSessionManager.m -> _AFURLSessionTaskSwizzling implementation and comment out the line [localDataTask cancel]. If you use CocoaPods you might get a warning that you have to unlock editing of the file. That fixes it for me.
Having the same issue both with Xcode 7.3 and 8 Beta. If you run on iOS 8 simulator this seem to work. Not ideal, but better than nothing.

NSLocalizedString not working for some word

I have english, Japanese, korea Localizable.strings file. I cannot load some word from korea file. I have checked spelling, capital letter or small letter also. It is correct. I have cleaned project, reset simulator and delete app on device also. It is not working for some words. May I know how to do?
A common problem is this: If there is an error in your localisable.strings file, anything after that error will be just ignored. The line that you are checking may be fine; if the line 10 lines above is broken, it won't work. If that is the problem, for example the item in the next line isn't going to work either.
Cleaning project, reset simulator, delete app on device, are all not going to do anything for you.
Also it may be some words, that repeats. If two same keys in Localizable.strings - it may be work not properly.
Also i found, that continue key make some bugs, so i changed it to CONTINUE.
HINT something like continue_question and anything that contains continue - makes same bug.
It seems like there are another words like this. Also got to say, that i didn't delete app and clean build folder due to debag this. In Xcode 7.3 it was't necessary.
It might also be due to a blank space in one of your empty lines in the Localizable.strings file.
It's tough to spot but you can spot it by looking at which point of the file the strings start to fail localization.
Check or search for # in your localizable.String .if there is any remove it . the key value pairs below the # are not working

Xcode 6: iOS doesn't use storyboard localizations

since I upgraded my Xcode project to Xcode 6, my storyboard localizations don't work.
I have:
A base localization as storyboard file (which is basically English)
Four string files: English, German, French and Japanese
Until Xcode 5 those worked without any problems.
But since Xcode 6 I have the following situation:
The application only uses the labels used in the base file when running on a device/simulator
BUT my Localizable.strings file, which I have in different languages for all non-storyboard related localizations, works perfect. (So in the end I have a mixture of languages while running on a device)
Since Xcode 6 there is the possibility to see the localizations as a preview screen in the assistant editor. Everything works there.
So: the only thing that doesn't work is the localization of the storyboard while running
Does anyone else have the same problem and is there a solution?
Update: With Xcode 6.1 GM the localization on the actual device is correct now but the simulator is English only, even if I choose another language in the simulator.
I am experiencing the samen problem. I have been struggling for hours getting my localized storyboard to work in Xcode 6.0, until I read your question. Then I tried the second GM of Xcode 6.1. There, my UILabels were localized properly on the device (not in the simulator). However, my UITextView did not get localized, which took me another 30 minutes to figure out.
Hopefully, this will be fixed soon.
I thought I had the same problem as I couldn't see any of my translated texts appearing in the simulator. I tried using a dummy new project and it worked which made me not so sure about what the problem was.
Then I decided to use a dedicated editor for the translation. After exporting, translating the files via the editor and importing them, I could see the correct texts in the iOS simulator. So I guess that it was the way I edited them manually which caused the issue.
FYI, the tool I used is https://poeditor.com
I've been experiencing the same issue. The solution is: you need to clean (shift-cmd-k) a project first, then you build and run it.
Try to switch localization files to “interface builder storyboard” instead of “localizable strings”. For some reason in my project Storyboard.storyboard works, but Storyboard.strings doesn’t. Probably xcode bug.

Why doesn't my ja.lproj show Japanese?

I tried to localize my app to Japanese, I got ja.lproj folder with AboutViewController.xib inside it, but when I run my app in region Japan with Japanese language, it doesn't show Japanese, still only show English, what do I have to do for anything else?
Though I clean all targets and build again, repeat these process, but I couldn't get what I need, at last, I deleted app on Simulator, now everything is ok, I got what I need, why is so simple, but no expert tell me, I spent whole two days!

Resources