Search Unity

I2 Localization ( The most complete Localization solution for Unity )

Discussion in 'Assets and Asset Store' started by Inter-Illusion, Feb 27, 2014.

  1. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I was not able to make the 2dtoolkit sprite collection translation work!

    Could you please show me a step by step guide of how to change an SpriteCollection with I2?

    On examples you only change the current sprite name, and not the full SpriteCollection.

    Thanks!
     
  2. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    Changing the SpriteCollection for an sprite works the same than changing the font for a label.

    Here is a tutorial for changing the font:
    http://inter-illusion.com/tools/i2-localization/how-to-change-font-per-language

    You have to select as the Main translation the sprite you want to use and as the Secondary translation you should select the Collection. Note that the collection will not show in the list of types as the font does, but you can select "Object" and just drag the collection.

    When the language changes, it will check the Secondary translation for each sprite and if its set, it will use it as an SpriteCollection.

    Nonetheless, on the next release, I will be adding an option for the SpriteCollection on the dropdown list to make it easier to identify.

    Thanks and please let me know if you get any further issue,
    Frank
     
  3. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    "Translation Modifiers - Concatenation for adding names and values to the translation could break the output as the word order changes based on the language. This plugins provides configurable callbacks for correct concatenation and replacements."

    Any example of how to use this?
     
  4. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    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

    Example:
    Code (csharp):
    1.  
    2. public void OnModifyLocalization()
    3. {
    4.       if (string.IsNullOrEmpty(Localize.MainTranslation))
    5.           return;
    6.  
    7.      string PlayerColor = LocalizationManager.GetTermTranslation( "Color/Red" );
    8.  
    9.      Localize.MainTranslation = Localize.MainTranslation.Replace("{PLAYER_COLOR}", PlayerColor);
    10. }
    11.  
    By using the modifier, the final translations become:
    English: "Red wins"
    Spanish "Ha ganado el Rojo"
     
  5. vicenterusso

    vicenterusso

    Joined:
    Jan 8, 2013
    Posts:
    129
    It would be nice to support [ExecuteInEditMode]. That way we can check the length of all specific Term in all languages that we have on spreadshit and make all necessary adjustments (button width, etc)

    For example, the word skip:
    English: skip
    French: sauter
    Spanish: omitor
    Russian: пропускать
    German: überspringen

    Having a way to check this right on scene without hitting play is a great time saver.
     
  6. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    It seems that sometimes I2 is converting some characters to it's Unicode Equivalent.

    Ex :

    - (ASCII 45) is being converted to – (ASCII 8211) after Importing from Google Spreadsheet.

    I checked the original file and everything seems to be ok.

    How can I solve this problem?
     
  7. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Hi, I'm getting this error in Unity 5 beta 20

     
  8. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    I upgraded the project to Unity5.0.0b20, but I'm not getting that issue.
    After the unity upgrader runs, I'm not getting any error/warnings.
    I will continue testing more indepth the beta 20, but nonetheless, the error you are getting can be removed by replacing line 26 of UpgradeManger.cs:

    from
    Code (csharp):
    1.  
    2.                 EnablePlugins( target );
    3.  
    to
    Code (csharp):
    1.  
    2. if (target !=BuildTargetGroup.Unknown)
    3.                 EnablePlugins( target );
    4.  
    Also, you could stop the automatic i2 setup as that only needs to runs once and you could even set the name of the target you are going to use in the Script define Symbols (e.g. NGUI or UGUI)

    You can disable the automatic i2 setup by commenting line 11:

    Code (csharp):
    1.  
    2.      // EditorApplication.delayCall += CheckPlugins;
    3.  
    However, I will continue checking this beta as its weird you are getting issues while I don't see any error been reported. BTW, are you upgrading a project or installing I2 in a new project?

    Thanks,
    Frank
     
  9. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,007
    Thanks for the reply. I tried deleting i2 from my project and reinstalling and i still get the error. I'll look in to modifying the code as you suggested.
     
  10. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I wasn't able to build for Windows Store! I got some erros related to System.StringComparison on LanguageSource_Import_CSV and LanguageSource.cs.

    Do you intend to fix it?
     
  11. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    That was fixed in 2.4.0b6 which can be downloaded from the I2 Community (Its still waiting for review in the AssetStore)

    It can also be fixed by replacing InvariantCultureIgnoreCase by OrdinalIgnoreCase in those files.

    Thanks,
    Frank
     
  12. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi guys,
    Its nice to announce that version 2.4.0 f2 is now in the AssetStore!

    It includes lot of fixes and new features like accessing the Google Translator service from within the game!
    Allowing you to translate dynamic texts like showing chat messages in the device language, downloading content from bundles and translating it on demand.



    Check the release notes for further changes

    BTW, Remember to delete the I2 folder before upgrading!
     
  13. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi guys,

    I'm glad to announce that version 2.4.1 is now live on the AssetStore.

    It has lot of fixes and performance improvements.
    Also features a redesigned UpgradeManager that avoids overriding the changes made to the I2Language.prefab and ScriptLocalization terms.
    Better support for TextMeshPro and TextMeshPro Beta and lot of new additions.

    Thanks,
    Frank
     
  14. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I have a problem with the iOS build on Unity 4.6.2... It seems related to I2. Any Idea?

    ArgumentNullException: Argument cannot be null.

    Parameter name: key

    at J_EasyTouchTemplate.Main () [0x00000] in <filename unknown>:0

    at J_EasyTouchTemplate.Main () [0x00000] in <filename unknown>:0

    at J_EasyTouchTemplate.Main () [0x00000] in <filename unknown>:0

    at I2.Loc.Localize+DelegateSetFinalTerms.EndInvoke (System.String& primaryTerm, System.String& secondaryTerm, IAsyncResult result) [0x00000] in <filename unknown>:0

    at I2.Loc.LanguageSource.GetTermData (System.String term) [0x00000] in <filename unknown>:0

    at I2.Loc.LanguageSource.TryGetTermTranslation (System.String term, System.String& Translation) [0x00000] in <filename unknown>:0

    at I2.Loc.LocalizationManager.TryGetTermTranslation (System.String Term, System.String& Translation) [0x00000] in <filename unknown>:0

    at I2.Loc.LocalizationManager.GetTermTranslation (System.String Term) [0x00000] in <filename unknown>:0

    at Goal.Configure (.PlayerGoals _goal) [0x00000] in <filename unknown>:0

    at formGoals.OnEnable () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.UnityAction.EndInvoke (IAsyncResult result) [0x00000] in <filename unknown>:0

    at UnityEngine.GameObject.SetActive (Boolean value) [0x00000] in <filename unknown>:0

    at Utils+<ShowDialogWithBlack>c__Iterator2B.MoveNext () [0x00000] in <filename unknown>:0

    at UnityEngine.Events.UnityAction.EndInvoke (IAsyncResult result) [0x00000] in <filename unknown>:0

    UnityEngine.Events.UnityAction:EndInvoke(IAsyncResult)

    UnityEngine.GameObject:SetActive(Boolean)

    <ShowDialogWithBlack>c__Iterator2B:MoveNext()

    UnityEngine.Events.UnityAction:EndInvoke(IAsyncResult)


    (Filename: currently not available on il2cpp Line: -1)
     
  15. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I found the problem. It was a serialization problem so I was passing a NULL to getTermTranslation instead of a String.
     
  16. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    Its great you found it. I will add a condition to deal with that case.

    Thanks,
    Frank
     
  17. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Is it possible to use a CSV on StreamingAssets and my game alway auto-update from it when running? I need to send the game for external localization and they prefer altering the CSV instead of using the Google.
     
  18. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    There is no built-in implementation for updating automatically from a CSV, but you could add a script to your startup scene that downloads the file and then call:
    Code (csharp):
    1.  
    2. var CSVstring = read file content
    3. LocalizationManager.Sources[0].Import_CSV( string.Empty, CSVstring, eSpreadsheetUpdateMode.Replace );
    4. LocalizationManager.LocalizeAll();
    5.  
     
  19. Hacky

    Hacky

    Joined:
    Mar 22, 2013
    Posts:
    28
    Hi,

    at first. Congratulations! Nice Plugin. I won't miss it anymore. :)
    But it seems, that there is an serialization problem with the order of languages. When I reordered the languages and go into play mode and then exit play mode, the order will be same like before reodering. Do you have any suggestions?

    Best regards,
    David
     
  20. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    I'm glad you find it useful!
    About the reordering, I tried several cases but wasn't able to reproduce your issue. Can you please provide me some steps that make it fail for you?

    I tried the following:
    - Opened the I2Languages.prefab in the Resources folder
    - I had 3 languages in that list, so I clicked the Up and Down arrows to change the order.
    - Then I clicked Play and after a moment stopped the game.
    - I opened the prefab again and it kept the last order I specified.


    I also tried doing the same for a LanguageSource in a Scene but the order was kept.

    Then I tried a different thing:
    I clicked Play and while the game was running, I modified the order of the languages in the source inside the scene. Once I stopped the game the order was reverted. But this is expected as all GameObjects inside the scene are expected to revert the values that are modified while playing.

    However, If I modify the order of the I2Languages.prefab while playing, those are not reverted as its a prefab.

    Can you please provide me the steps that are failing for you?
    Thanks,
    Frank
     
  21. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hey Guys,
    Version 2.4.2 is now in the AssetStore!

    +Frank
     
  22. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I cannot update anymore from Google Docs. I got "TypeError: Cannot call method "toString" of undefined.". I tried to install a new script, but the error remains.
     
  23. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    I just tested the version on the AssetStore and it's working as expected for the import/export to google.

    Before upgrading, did you deleted the I2 folder? or at least the I2\Common? Depending on which version you was before, the structure of the plugin changed a bit and unity on some situations doesn't delete the old files.

    Also, did you reinstalled the WebService? This version requires the WebService to be upgraded as well. You should be getting a warning requiring you to upgrade.

    Please, let me know the steps to reproduce your issue to be able of helping you better.

    Thanks,
    Frank
     
  24. Hacky

    Hacky

    Joined:
    Mar 22, 2013
    Posts:
    28
    I did the same like you. And I find out that when I save my change to my google doc, then this error doesn't happen. May be it has something to do with import/export.
     
  25. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I'm facing some strange bugs!

    With TextMeshPro, I write my tag on the TextInputBox property, by example Power1Name.... and I add a Localize Component. The Localize component finds my tag and show it in yellow.

    Ok, this is correct and expected behavior!

    But I don't know when, it translates my TextMeshPro component, and even I Stopping my Game Execution, I lose the reference to my TAG and the TextMeshPro components keeps the Translated Text.

    Is this expected?
     
  26. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    I have been trying to reproduce that issue but I haven't been able to. Can you please find a set of steps that make the text loose its content. That will help me a lot to get you a fix.

    Normally, when you don't specify a term in the Localize component, it uses the one in the label. As you said, to show you that it doesn't have a term, it shows the term in a yellowish color.

    One of the features that was introduced a couple versions ago, is that whenever you click on a translation, the label's text is changed to show the translation.
    That way you can see if all your translations fit in the label just by clicking each of the translation. However, as this feature changes the label's text, whenever you click on a translation without specifying a term (showing as yellow), the Localize component takes the label's text as the term (changes to white). That way, even when the label's text changes, you keep the term and the localization stays correct.

    To try reproducing your issue, I tried setting the term as None and clicking the translations. But even though the label's text changed, the Term stayed as expected. The same happened for me when playing the game in the editor, and stopping.

    Can it be that what you are seeing as an error is this preview feature? Once you click or modify a tranlation, the label's text changes, so you see if it fits correctly. But then you can click the English or your default translation and it will update the text.

    Thanks,
    Frank
     
  27. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Hi Frank!

    I'm not 100% of how it happens, but it happens to me all the time! =(

    - Right now I was doing multiple builds (Win/Mac/Linux), and working on the web, and after some time I returned to unity and it had happens again.

    I don't think I have clicked play on editor. It seems that just keeping unity open and doing some other things is enough to make it happens. But I cannot reproduce the exact steps. Does this make any sense?
     
  28. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I upgraded my project to Unity 5 and I got this error on console :

    PlayerSettings Validation: Requested build target group (0) doesn't exist; #define symbols for scripting won't be added.
    UnityEditor.PlayerSettings:SetScriptingDefineSymbolsForGroup(BuildTargetGroup, String)
    I2.Loc.UpgradeManager:EnablePlugins(BuildTargetGroup) (at Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs:55)
    I2.Loc.UpgradeManager:EnablePlugins() (at Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs:29)
    I2.Loc.UpgradeManager:CheckPlugins() (at Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs:20)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
  29. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
  30. Green-Sauce-Games

    Green-Sauce-Games

    Joined:
    Mar 27, 2014
    Posts:
    69
    Thanks for the fix!

    I think I found the problem with "losing tags".... With an open scene, after I create a Build, or after it finishes "Switch Platform" all my TextMeshPro labels have the tags changed to it's translation, and if I save my scene now, boom, all my tags are lost forever.

    I just made a test here, everytime I create an iOS build with my scene open this happens!

    I hope this help you fixing the problem!
     
  31. Hacky

    Hacky

    Joined:
    Mar 22, 2013
    Posts:
    28
    Hi,

    and another strange behaviour. Actually I import (with replace option) my keys from my google document. Everything works, but when I close Unity und reload the project, every change is missing and I have to load my google doc again. May be there is something strange with serialization. This failure happens in 4.6.2p2.

    Best regards,
    David
     
  32. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Hi Hacky!

    I have the same problem! Sometime I import from Google and everything is OK! I close and open Unity and my I2 prefab reverted to an older version without this last update. Happens often with me.
     
  33. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    Are you using the latest version (2.4.3f1)? In that version, I added more code to force saving everytime I download from google.

    Also, I just tried this and its working for me. Are this the steps you are using to reproduce that issue?

    - Open Unity
    - select the I2Languages.prefab
    - Import from google with "Replace"
    - close unity
    - open unity again
    - click in I2Languages.prefab
    - verify that all the terms are still there

    Thanks a lot,
    Frank
     
  34. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi Guys!
    Today Unity has the I2 Localization on the 24h SALE at 50% OFF.

    If you want to localize your projects and use advanced features like Automatic Google Synchronization and Real Time Translations then NOW is the best moment to purchase the I2 Localization!



    The I2 Localization can be purchased from the AssetStore.
    More Information and tutorials can be found at the Inter Illusion website.

    Thanks,
    Frank
     
  35. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Do you know that the I2 Localization supports the New Unity UI ?

    ... and TextMesh Pro, NGUI, DF-GUI
    ... and can localize Texts, Fonts, Sprites, Prefabs, Sounds, Animations, Atlases

    Well, the better question is "What I2 Localization doesn't support?"

     
    Last edited: Mar 31, 2015
  36. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    The sale ends in 5 hours!

    (I don't know when Unity will add the plugin again to its sales, and I have been told that the waiting list is over 1 year long, so don't miss this opportunity if you want to expand your Market)
     
  37. Edgaras-Randis

    Edgaras-Randis

    Joined:
    Jul 8, 2014
    Posts:
    20
    I'm also getting:

    Code (CSharp):
    1. PlayerSettings Validation: Requested build target group (0) doesn't exist; #define symbols for scripting won't be added.
    2. UnityEditor.PlayerSettings:SetScriptingDefineSymbolsForGroup(BuildTargetGroup, String)
    3. I2.Loc.UpgradeManager:EnablePlugins(BuildTargetGroup) (at Assets/3rd Party/I2/Localization/Scripts/Editor/UpgradeManager.cs:96)
    4. I2.Loc.UpgradeManager:EnablePlugins(Boolean) (at Assets/3rd Party/I2/Localization/Scripts/Editor/UpgradeManager.cs:70)
    5. I2.Loc.UpgradeManager:CheckPlugins(Boolean) (at Assets/3rd Party/I2/Localization/Scripts/Editor/UpgradeManager.cs:20)
    6. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    7.  
    and the fix from above helped out.
     
  38. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    Version 2.4.4 f1 accidentally reverted the fix for the UpgradeManager when merging the branches for Unity 5.
    I wrote a solution in this post: http://inter-illusion.com/forum/i2-localization/182-unity-5-support#562

    Just use the UpgradeManager.cs attached to that post and it will work.
    I also added that fix to 2.4.4 f2 which I will release later today.

    Thanks,
    Frank
     
  39. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I upgraded to latest version now It does not works anymore for me.

    StackOverflowException
    I2.Loc.ResourceManager.get_pInstance () (at Assets/I2/Localization/Scripts/ResourceManager.cs:24)
    I2.Loc.LocalizationManager.RegisterSourceInResources () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:193)
    I2.Loc.LocalizationManager.UpdateSources () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:165)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:47)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/LocalizationManager.cs:226)
    I2.Loc.LocalizationManager.SelectStartupLanguage () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:77)
    I2.Loc.LocalizationManager.InitializeIfNeeded () (at Assets/I2/Localization/Scripts/LocalizationManager.cs:48)
    I2.Loc.LocalizationManager.HasLanguage (System.String Language, Boolean AllowDiscartingRegion) (at Assets/I2/Localization/Scripts/Localizat<message truncated>
     
  40. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    2.4.5 f2 has a bug that caused that error.
    Please download 2.4.5 f3 from the community page or apply this fix:
    Replace the LocalizationManger.cs with the one I have attached.

    Thanks,
    Frank
     

    Attached Files:

    Last edited: Apr 7, 2015
  41. TBruce

    TBruce

    Joined:
    Jan 18, 2015
    Posts:
    85
    Hi,
    Does I2 Localization support currencies? This would include the decimal separator as well as the currency.
    Thanks!
     
  42. LSPredator

    LSPredator

    Joined:
    Jun 23, 2014
    Posts:
    8
    Hi. I upgrade to 2.4.5 f3, and now I can't change label translation at runtime. For example, I have quest window, and want to change quest name:
    Code (CSharp):
    1. I2.Loc.Localize QuestNameLoc = Trans.FindChild("Container/QuestName").GetComponent<I2.Loc.Localize>();
    2. QuestNameLoc.Term = "Quests/NameSellRes";
    3. QuestNameLoc.OnLocalize();
    But nothing happen, I continue see name of previous quest.
     
  43. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    When terms are omitted, the label's text or sprite's name is used as a term. To avoid changing the original Term value (empty), the "inferred" term is saved into a temporal variable (finalTerm) and that's what's used.

    This means that if the Localize component is already enabled, you have to change the finalTerm instead of the Term variable.
    There is handy method for that:
    Code (csharp):
    1.  
    2. QuestNameLoc.SetTerm("Quests/NameSellRes");
    3.  
    SetTerm(...) internally calls OnLocalize(), so you don't need to call that yourself :)

    Hope that helps,
    Frank
     
  44. LSPredator

    LSPredator

    Joined:
    Jun 23, 2014
    Posts:
    8
    Thanks for the explanation! Now I realized.
    And very thanks for the awesome plugin!
     
  45. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    579
    Hi, how does it work the arabic support?
    I'm currently using Text Mesh Pro beta, but it has no support for it yet. Also I don't know how to create a proper font atlas for this language.
    Should I switch to default unity text for Arabic language?
    What font do you suggest? Arial is enough or I should use something more specific?
    Thanks
     
  46. TBruce

    TBruce

    Joined:
    Jan 18, 2015
    Posts:
    85
    Try ArialUni.ttf.
     
  47. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    Hi,
    For rendering arabic correctly, the plugin changes the order of the chars in the string. It also replaces and adds a few chars based on the one that precedes or follow them. That will make that when rendering each of the characters, it looks as it should. But basically is just altering the initial string to follow the arabic rules.

    If you are using TextMesh Pro, then its a good idea to keep using it and just generate the appropiate atlas. You can do it in several ways:
    The easiest is to pick any ttf font that includes the arabic chars. As suggested previously, Arial will work just fine.
    Then, in the TextMesh Pro, generate a font atlas that contains the arabic characters (0600—06FF, 255 characters).
    And use the I2L plugin to change the used font based on the language (latic font, arabic font, rusian, etc) so you will always use the smallest font atlas possible and save memory.

    Another (better way) is that after you translate all your text, you make TextMesh Pro to create an atlas with only the characters actually used (most of the time, you wont use all chars)


    BTW, I'm sorry for the issues with the Forum. The site was hacked and I'm restoring it and updating the security issues that were found. The I2L forum should be available (hopefully) soon :)

    Thanks,
    Frank
     
  48. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    579
    Thank you very much.
    I already tried to create an atlas with the range 0600—06FF with Text Mesh Pro but there were many squares representing empty characters.
    I'll try again, using a more refined selection.
    I was worried that I2 would not work with TMP atlas for Arabic language, buy only with standard Unity dynamic fonts.

    By the way it would be a huge improvement to have a global settings for I2 to switch font on different language. Now, if I understood correctly, I have to go through all the texts in every scene and every prefab to add the new atlas. And when I'll go for Russian I'll have to do all again with the risk of forgetting some texts.
    Please let me know if there is already a better way.
    Thanks
     
  49. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    463
    There is an easier way. You could do as in the Standard Components example scene.
    If the name of your font is "Arial", you could just create a term named "Arial" and select the font you want to use for each language.
    But don't change the font setting in the actual label.

    When the plugin runs, it will automatically take the name of the font used in each localized language and try finding it in the list of terms. As you already have an Arial term, then it will use it and change the font based on the language.
    The fonts for each language can be added to the resource folder so they get loaded on-demand, or you could add them to the Assets tab in the Language Source. (this last is automatically done by the plugin if the font is not in the Resources folder).

    Hope that helps
    Frank
     
  50. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    579
    Thanks, I'll try it.

    In the meantime I created an atlas using the Arial font (also Arial Unicode) and when the text is rendered It shows only the few characters of each word.

    This is the text that should appear (in the forum is inverted):
    جﺎﺘﻧﻹا ﺪﻴﻗ لاﺰﻳ ﻻ لﻼﺘﻟا ﻖﻳﺮﻃ قﺎﺒﺳ
    ةﺪﻳﺪﺟ تاﺰﻴﻣ حاﺮﺘﻗاو ﻞﻜﺸﻣ يأ ﻦﻋ غﻼﺑﻺﻟ ﺎﻨﻳﺪﻟ ىﺪﺘﻨﻤﻟا ﻰﻟإ ﻢﻀﻧا

    See the picture I uploaded.
    Thanks
     

    Attached Files: