String stuck in different language on Android
- NGUI Label
- Has Localize component
- We support 12 languages, and English is the default
In the Editor, we click on one of the non-default languages in the Localize component -- say, Chinese for this example. Then the text in the NGUI label changes to Chinese in the Editor. We leave it that way. We run the game, and it correctly shows up in English (as English is game's selected Language). It changes as we change language. This works fine on iOS also. However, on Android, no matter what language is selected, that string will appear in Chinese. All the other strings in the game work properly.
I don't know for sure if those are all the reproduction steps, or if there is something I'm missing (it may involve changing the game's saved language when running in the editor, and exiting the game/restarting, not sure). I'm also not sure if this happens 100% of the time, but I do know it has happened to us a few times and been confirmed by players.
Maybe this is a feature? Is this expected, or a known issue? Has anyone else seen this before? Is there something else that might be causing this to happen other than the steps above?
- When I remove the Localize component entirely from the label, and then manually type some totally different text into the label in English, then I run the game in the Editor, the text reverts back to the old Chinese string. Very confusing. To fix it I delete the entire label, and create a new label with a new localize component fresh.
A few questions:
What version of I2 Localization are you using? Unity version?
When I remove the Localize component entirely from the label, and then manually type some totally different text into the label in English, then I run the game in the Editor, the text reverts back to the old Chinese string. Very confusing. To fix it I delete the entire label, and create a new label with a new localize component fresh.
If I understood you correctly. For that label, you had a Localize component assigned, and it was misbehaving. Then you remove the Localize component, so, nothing should be localizing it. But when you run the game, the label's text changes (even though it shouldn't be modified because there is no Localize component). Is that right?
Two things come to mind. Did you copied the Localize component from that label and pasted it to another object? I'm trying to figure out, if the reference to the original label was kept when you copied the component. I don't see in the code how that could happen, but will run a few more test to be sure.
So that when you localize label1, its localize component its actually localizing label2.
The other obvious thing is, can you double check you don't have any code that changes that text from script? I guess you already verified, but its worth checking this just to be sure
However, on Android, no matter what language is selected, that string will appear in Chinese.
Can you double check that the localize component of that label has a term assigned, and not "Inferred from text".
Another thing to double check, is that terms translations have two tabs (Normal and Touch), it could be that the translations on them are different, so in Touch there are empty translations?
If they are different, try emptying all of the Touch translations and just filling the Normal (or viceversa)
When there are empty translation, the plugin tries to fallback to the first non-empty translation. Could that be issue?