I2 Localization ( The most complete Localization solution for Unity )

I also extended the range to include all the middle characters: U+0600..U+06FF + U+FB50..U+FDFF
Now my atlas has 944 chars. But still I can't see any middle letter. The difference is that TMPro is not printing anymore red X.

Why FixForRTL is by default false?
Is there a way to have it by default true? Every time that I'll regenerate it there is a risk to forget about this and it will mess all the Arabic localization.
Thanks.

I have created 3 languages in the i2 settings: zh-TW, zh-CN, and en-US however, when I test on an iPad, it's only shows zh-TW (traditional Chinese) when the ios language sets as simplified Chinese( zh-CN) what's the problem here?

What is the proper way to update this addon without losing the data that's been entered in the I2Languages prefab? Should we just move that prefab to a different folder, then delete the I2 folder and re-import the whole thing? Or is there some other way to do this more properly?

All the localization data is stored in the I2Languages.prefab.
On previous versions, the plugin package included that prefab, so upgrading used to overwrite the prefab and changes were lost. That's why it was suggested to move the I2Languages prefab outside the I2 folder.

However, thats not longer needed, as on the last versions, the I2Languages.prefab is not included in the package so it doesn't overwrite the existing localization data. Instead, the plugin automatically creates the prefab after importing if it is not already in the project!

So, you can just import the plugin from the store and it should work fine.
Said that, its adviseable to always do a clean install because some times Unity have missbehaved with the GUID, specially when dealing with Unity4/Unity5 compatibility.

So, the safest way to upgrade, its to:
- Export the I2Languages.prefab to a Google Spreadsheet or CSV file
- delete the I2/Localization folder
- import the new version.
- Open the I2Languages.prefab and Import back the Google Spreadsheet or CSV file

Yes, TextMesh Pro is fully compatible and there are even example scenes showing how to integrate it.

3. Is it possible to download languages at runtime?

Click to expand...

The plugin has a feature named Google Live Synchronization that automatically keeps the localization synchronized with a google Spreadsheet.
You just need to link the LanguageSource with the Google Spreadsheet and any change you do will be automatically downloaded in the game.
This works even after releasing your game in the Appstore. You will no longer need to wait another week for updating you localizations while Apple approves the update. Just link and modify at will.

Fortunately, I have been working on Version 3 (free upgrade) that modifies the used data structure and one of the features is that it allow is loading/unloading at runtime whats needed.
Version 3 also includes lot of other features like Plurals, Crowd Localization, Auto Parameters, etc.

Fortunately, I have been working on Version 3 (free upgrade) that modifies the used data structure and one of the features is that it allow is loading/unloading at runtime whats needed.
Version 3 also includes lot of other features like Plurals, Crowd Localization, Auto Parameters, etc.

Thanks,
Frank

Click to expand...

Do you have a time estimation on when V3 will be released?

Also another question
Can I set the default language depending on the store/device localization the app runs at? For instance, for US app store/Google Play/Facebook WebGL it will be English, for China Chinese etc (in default I mean without the user needing to choose it unless he wishes too).

I2L v3 is a big change as it touches most of the editors and given that its a major version I have spent some time making the editor flow even easier to use/understand.
So, it will be around two months more of development.

However, I have been back porting all the features I can into 2.x and I'm doing releases every 2-4 weeks.
There is currently 2.6.0 almost ready to test and I'm planning on releasing 2.7.0 before v3. But most likely v3 will be after that or near.

Can I set the default language depending on the store/device localization the app runs at

Click to expand...

When the plugin starts it gets the device language and uses that if a similar language or variation is in your LanguageSource.
If the player selects a new language, then the new language is store in PlayerPrefs and used in the next sessions.

If the user doesn't manually change the language, it will always keep defaulting to the language that unity provides. So, if you change the device language, that change will also happen in the game.

Hi,
I don't own a copy of Dialogue System so I don't know exactly how it is set.
I will see if I can check it out and let you know.

Nonetheless, I2 Localization has been design with easy integration in mind, so adding more targets its really simple. And if you just need to localize the text output of Dialog System, you could replace where the DS sets the text of the labels from
label.text = xxxx
to
label.text = I2.Loc.ScriptLocalization.Get(xxx);

Hi Frank,
i recently purchased this i2 localization pack. i am facing some problem.
1)it is not showing Korean, Japanese, russian and arabic language text in my iphone.
2)does it has auto language detect feature, according to the contury where it is installed?
thanks

Yes, the plugin detects what language your device has and it enables them if you have them in your LanguageSource.

Is the issue you are seeing of not showing some language that you "can't see the texts" for those languages, or that it keeps the text in English or whatever your default language is?

All the languages you mention have different Characters Sets. If the issue is that all texts are gone, then it could it be that the font you are using doesn't have those characters. Are you using a TextMesh Pro or other Bitmap Font based UI?
Switching to dynamic fonts could solve the issue for you. Or more adviceable, you can have different fonts to hold the different characters sets.
Here is a tutorial on how to change fonts per language:http://inter-illusion.com/tools/i2-localization/how-to-change-font-per-language

If you can still see all texts in English, then it could be that the language is already saved in your device.
When the plugin starts in your device for the first time, it finds the language your device is using, sees if there is a matching language in your LanguageSource. If there is one, then it enables that language.

That process happens every time you start your game/app. However, if at any time, you change the language inside the game, by clicking a button or selecting it from a dropbox. Then that selection is saved and every time the game starts from now on, it will not detect the device language and instead, it will use the saved selection.

(This could had happened, if you ran the example scenes in your device and switched languages)

You will have to delete the game, and then reinstall it to wipe the saved PlayerPrefs.

Hi, regarding the new Touch/Normal localization feature, is there a way to disable this? I am starting to get some out of sync values for the Touch and Normal values for a term if I forget to change both. So if I update the values for the Touch version of a term and I don't remember to change the Normal version they are now different. Or is there a way to link the so that they will both be the same unless we force a change for a specific term? Most of the time the terms on mobile and desktop are the same, there are only some specific cases where the terms might be different, so it might be better to have a way to just turn on the Touch version for specific terms.

Hi , sorry for my english , i want to ask how can i translate the text for dynamic for like text.label = text(that text i want to translate , because i change the text , i want to translate too , how can i do that? (i already bought your Plugin :B) i hope you can help me

Hi, regarding the new Touch/Normal localization feature, is there a way to disable this? I am starting to get some out of sync values for the Touch and Normal values for a term if I forget to change both. So if I update the values for the Touch version of a term and I don't remember to change the Normal version they are now different. Or is there a way to link the so that they will both be the same unless we force a change for a specific term? Most of the time the terms on mobile and desktop are the same, there are only some specific cases where the terms might be different, so it might be better to have a way to just turn on the Touch version for specific terms.

Thanks

Click to expand...

Hi, Normally you don't need to set the translation for both Normal and Touch modes.
If you change the translation of one of the modes and make the other mode empty, it will take the same translation of the mode you set.
But if you also add text to the other mode then you will get different translations based on the current mode.

So, if for some terms you are getting translations based on the mode, but you want both modes to have the same translation, just go to the Normal or Touch mode, select the translation and delete it, make it empty. That will link both translations.

Hi, is it somehow possible to change multiple sprites on a object. specifically i am trying to change all styles (default,, highlighted, pressed, disabled) of a ui button when set to "sprite swap".

Click to expand...

Currently, there is no support for localizing button states. I will add that to the TODO list and will try adding support in the next versions.
Nonetheless, you can workaround this in a couple ways:

For both, you will need to create a term for each state and select the Atlas or SpriteName for each state/language. For example, for term: "Button Play" , create terms "Button Play_Normal", "Button Play_Pressed", etc

You can create a custom script that gets the term used in the Localize component, and then gets the translation for each of the xxx_Normal, xxx_Pressed, etc and change the sprites based on their translations.

Hello there, I am curious to know if there is any way to set a default language, if there is no text currently in that Term for that Language, so the spot where there should be text is not blank?

Thank you

Click to expand...

Hi, You could click Translate next to every language so that the term gets auto translated to all the languages.
On the latest beta (2.6.0) there is a Translate All button to avoid having to click each of the Translate buttons.

Also, if you export to google and import back, All empty translations get automatically translated and flagged as "Auto Translated" so that you could identify later on which translations were done by a human and which by the Google Translation.
I'm planning on sending 2.6.0 to the store tomorrow.

Hi , sorry for my english , i want to ask how can i translate the text for dynamic for like text.label = text(that text i want to translate , because i change the text , i want to translate too , how can i do that? (i already bought your Plugin :B) i hope you can help me

Click to expand...

There is a couple way of doing that with the Plugin.
If you want to change between predefined texts then (e.g. displaying "You Win" or "You Loose"), just add a term for each of the variants. (e.g. "WIN", "LOOSE").
Then add a localize component to the label, and execute:

Code (csharp):

label.GetComponent<Localize>().SetTerm("WIN");

That will find the "WIN" term, get the translation for the current language and update the label's text.

If instead, you want to access to the translation of some term directly on the code, you can use the ScriptLocalization.Get(term) function.

Code (csharp):

var text = I2.Loc.ScriptLocalization.Get("WIN");

Debug.Log(text);

"WIN" needs to be defined as a term in the i2Languages prefab or any other local LanguageSource.

The plugin also offers the ability of translating text dynamically by using Google Translator. That can help you translate text entered by the user (chat messages, server updates, etc).
As this needs to contact google it can take a moment depending on your network connection/speed. Normally its adviced to only use this feature for texts that is not known when creating the game. And add all other translatable text as terms into the global or local source.

Using google translator can be done in to ways:

Code (csharp):

// Async: translate English to Spanish and calls OntranslationReady function when finished

Hi, You could click Translate next to every language so that the term gets auto translated to all the languages.
On the latest beta (2.6.0) there is a Translate All button to avoid having to click each of the Translate buttons.

Also, if you export to google and import back, All empty translations get automatically translated and flagged as "Auto Translated" so that you could identify later on which translations were done by a human and which by the Google Translation.
I'm planning on sending 2.6.0 to the store tomorrow.

Click to expand...

Thank you for the Reply

I like the features you are adding.

It would be nice to still have a default language, just incase some steps get missed.
Seeing a blank text section, for a player, is much worse than the language being wrong.

It would be nice to still have a default language, just incase some steps get missed.
Seeing a blank text section, for a player, is much worse than the language being wrong.

Click to expand...

By "having a default language" are you referring to fallback to another language (e.g. English) whenever the translation of some term is empty/not set?
So that if you select the Spanish language, but for the term "PLAY BUTTON" you forgot to add the spanish translation, it shows the English instead?

I agree that in case of an error or missed translations, its better to show something than empty. One of the things I'm planning on adding to 2.7.0 is a red warning for missing things when playing in the Editor. So, that if you forget to add the Spanish translation for some term, it will show as "MISSING TRANSLATION". That should help identifying errors and omissions.

Also, it could be as you suggested, that when not playing in the editor, if some translation is missing, it can fallback to the first translated language for that term. That will at least ensure that when the game is released, you don't get empty labels in case of an error.

Hi,
The scene "UnityStandard Localization" shows one text using the localization modifiers. Its the text in the middle displaying "Localization Callback".

That allows writing a function to modify the translation before it gets set into the label/object.

In that example, the term has the following translations:
English: "{PLAYER_COLOR} wins!"
Spanish:"Ha ganado el {PLAYER_COLOR}"

When translating that term, a function is executed that replaces {PLAYER_COLOR} by the color of the winning player. That color can also be translated into the correct language.

There is a section in the Localize component that allows you to select the function that will modify the translation. Once that function is called it can modify the values of the following static variables:
Localize.MainTranslation and Localize.SecondaryTranslation

I got it to work on a Text object with Localize, but I'm looking for more flexibility on how I can replace them.

I have two different abilities, both of them look like this:
mAbilityInitialBuff = Boost your {TARGET_TYPE} card stats by {PERCENT}% at Duel Start.
mAbilityInitialHex = Decreases rival's {TARGET_TYPE} card stats by {PERCENT}% at Duel Start.

What ends up happening is if I do a callback on a Text with Localize, it only makes use of the default ID that it uses (mAbilityInitialBuff) in Unity, so what happened is that it used the Buff ability description for the ones with the Hex ability as well.

Is it possible to do this in I2Languages?
(Sorry for the bad formatting of code. Some odd reason, the copy paste from Monodevelop doesn't space them out properly)

Hi,
If I understood you correctly, you want a label (cardDetailSkill) to change depending on the current ability. And that its text be localized and its parameters replaced by the corresponding values.

If that's the case, then the issue with the code you posted, is that you was doing the replacements to the Localize.MainTranslation variable which has the value you set in the localize component.

Then you were setting the text of the cardDetailSkill to the correct description (without replacements).
However, once that function finished and the callback returned to the Localize component, it was going to replace the cardDetailSkill text with the value in Localize.MainTranslation.

That happens, because when a label has a Localize component, this component is the one that manages the text. you shouldn't alter it directly as it will be overwritten.

I modified the GetAbilityDescription, to find the correct description text based on the current ability and replace its {parameters} by the corresponding values.

Then, the UpdateAbilityDescription (which is the one that should be selected as a callback), takes that description and assigns it to the Localize.MainTranslation.

This last function doesn't modify the label's text because as soon as the function finishes, the Localize component will take the value in Localize.MainTranslation, apply any filter you set (All Caps, RTL if needed, etc) and update the label's text.

Hi,
Yes, the plugin works on Unity 4.5 or higher.
However, there was a bug in Unity 5.1 and some of its patches that make the project fail when building xcode. (builds find for all other platforms, except for IOS)

That Unity bug was fixed in 5.2. And if my memory serves me well, there was one of the 5.1 patches that worked as well, although I can't remember for sure which one was it.

If for some reason, you can't update to 5.2 and need to deploy to IOS, please email me and I will try further looking for a workaround for you to be able of building.

Thank you for the great asset. It's really easy and time-saving plug-in. Thanks a lot.
BTW, I use lots of '\n' to seperate lines. But it seems your asset can't recognize the meaning of that sign.
Is there anyway I can use it? Or another way?

Oops...

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.