Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I2 Localization ( The most complete Localization solution for Unity )

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

  1. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    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.
     

    Attached Files:

  2. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I just resolved! :)

    The correct range is U+0600..U+06FF,U+FE70..U+FEFF for a total of 400 characters.
    It's was very hard to get it, there are so many different range for arabic language.

    Maybe you could add this to your documentation. It could help a lot other developers.
     
  3. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I have one more question. The script automatically generated for the localization has this line:
    Code (CSharp):
    1. public static string Get( string Term, bool FixForRTL = false ) { return LocalizationManager.GetTermTranslation(Term, FixForRTL); }
    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.
     
  4. newgaze

    newgaze

    Joined:
    Oct 27, 2012
    Posts:
    13
    there is a way that handles translation of NGUI popup list ?
     
  5. HuikuShih

    HuikuShih

    Joined:
    Nov 8, 2012
    Posts:
    11
    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?
     
  6. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    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?
     
  7. Inter-Illusion

    Inter-Illusion

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

    Thanks,
    Frank
     
  8. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Awesome, thanks for the quick reply!
     
  9. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    Hi there.

    I am considering purchasing your fine plugin.

    I have a few questions regarding the support:
    1. Does it work on WebGL too? (I am assuming it works for iOS and Android). What about Windows Phone? Blackberry?

    2. Does it happen to work with the TextMesh Pro plugin? which uses TextMeshPro object instead of unity's Text.(https://www.assetstore.unity3d.com/en/#!/content/17662)

    3. Is it possible to download languages at runtime?
     
  10. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    Yes, Yes and Yes :)

    Yes, it works on all those platforms. WebGL had issues on the first u5 versions, but those issues are fixed since 5.0.2.

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

    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.

    Hope that helps
    Frank
     
  11. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    Wonderful to hear!

    Thanks for your quick reply.

    In download at runtime, I wish to be able to install a new language and not have all the irrelevant languages installed on the device - is that possible?
     
  12. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Not with the current version.

    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
     
  13. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    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).
     
  14. Inter-Illusion

    Inter-Illusion

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

    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.
     
  15. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    Superb.

    Just purchased it.

    Sounds and looks like a wonderful plugin. I appreciate your quick support allot!
     
  16. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Thanks!
    And don't hesitate in ask here or at the I2 Forums any question or suggestion!!

    Thanks,
    Frank
     
  17. spartan

    spartan

    Joined:
    Mar 10, 2010
    Posts:
    174
  18. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    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);

    That will get you the basics :)

    - Frank
     
  19. abhishek1191

    abhishek1191

    Joined:
    Apr 13, 2014
    Posts:
    47
    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
     
  20. Inter-Illusion

    Inter-Illusion

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

    If those cases don't fix your issue, please let me know a bit more of your setup and I will help you narrow the issue.
    You can post here or at the I2 forums: http://www.inter-illusion.com/forum/i2-localization

    Thanks,
    Frank
     
  21. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Hi, thanks for this great asset.
    In my Unity 4, the gui overflow a bit. I had to change these values from 230 to 260:
    Code (CSharp):
    1. Translation = EditorGUILayout.TextArea(Translation, GUILayout.Width(Screen.width-260));
    LocalizationEditor_Terms_Description on line 198.
    Can you incorporate the change in the next version?
    Thanks
     
  22. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    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
     
  23. ludos

    ludos

    Joined:
    Nov 14, 2011
    Posts:
    55
    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".
     
  24. DookJosh

    DookJosh

    Joined:
    Apr 29, 2015
    Posts:
    6
    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
     
  25. Sosa17

    Sosa17

    Joined:
    Jun 20, 2013
    Posts:
    4
    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
     
  26. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    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.
     
  27. Inter-Illusion

    Inter-Illusion

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

    Code (csharp):
    1.  
    2. var term = GetComponent<Localize>().MainTerm;
    3. var pressedSpriteName = ScriptLocalization.Get( term + "_Pressed" );
    4.  
    5. GetComponent<Button>().spriteState.pressedSprite = Resources.Load<Sprite>( pressedSpriteName );
    6.  
    That code can be execute on the OnEnable of your script, or link it as a callback into the Localize component.
     
  28. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    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.
     
  29. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    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):
    1.  
    2. label.GetComponent<Localize>().SetTerm("WIN");
    3.  
    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):
    1.  
    2. var text = I2.Loc.ScriptLocalization.Get("WIN");
    3. Debug.Log(text);
    4.  
    "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):
    1.  
    2. // Async: translate English to Spanish and calls OntranslationReady function when finished
    3. GoogleTranslation.Translate( "Hello World", "en", "es", OnTranslationReady );
    4.  
    5. // Blocking: Querry google for the translation and waits until google returns
    6. text = GoogleTranslation.ForceTranslate( "Hello World", "auto", "es" );
    7.  
    Hope that helps,
    Frank
     
  30. DookJosh

    DookJosh

    Joined:
    Apr 29, 2015
    Posts:
    6
    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.
     
  31. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    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.
     
  32. Sosa17

    Sosa17

    Joined:
    Jun 20, 2013
    Posts:
    4
    Thanks so much for reply fast .
    You save me.
     
  33. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    607
    I've got a spam screen ? With the checkbox button that can't be unchecked :)
    Can you get ride of it as soon as possible, thanks.
     
    Last edited: Sep 15, 2015
    mcmorry likes this.
  34. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    That its a problem in version 2.5.0.
    Its fixed in 2.6.0 which is now available in the Asset Store.

    As soon as you update the plugin, you will be able to disable the auto check for new updates.

    If at this moment you can't update the plugin, then you could force disabling the detection by replacing the I2AboutWindow.cs file with the one attached here:

    http://inter-illusion.com/forum/i2-...n-manager-screen-always-opening-in-v2-5-0#981

    Hope that helps,
    Frank
     
    Last edited: Sep 16, 2015
  35. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Hi,
    I reported this bug on 14 august but I see the new version still has it. Can you fix it so that I don't have to modify it every time I update it?
    Thanks
     
  36. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hmm, seems that I missed that post.
    I will check that and correct the issue.

    Also, if you find any other problem, it will be great if you could post it in the inter-illusion forum instead, as its easier for me to keep track of all reports there than in the unity forum.

    Thanks and sorry for missing the post.
    Frank
     
    00christian00 likes this.
  37. charlesimaginary

    charlesimaginary

    Joined:
    Jul 23, 2015
    Posts:
    3
    That code does not work. It still displays the brackets....

    Code (csharp):
    1.  
    2. float percentDecrease = Mathf.Abs(myAbility.abilityEffectPercentage - 1) * 100;
    3. string factionTarget = myAbility.targetFaction.ToString ();
    4.  
    5. Localize.MainTranslation = Localize.MainTranslation.Replace("{TARGET_TYPE}", factionTarget);
    6. Localize.MainTranslation = Localize.MainTranslation.Replace("{PERCENT}", percentDecrease.ToString());
    7.  
    8. description = ScriptLocalization.Get("mAbilityInitialHex");
    9.  
    10. return description;
    11.  
    mAbilityInitialHex has {TARGET_TYPE} and {PERCENT} in them, but they do not get changed..

    Any help would be greatly appreciated!

    (Using Unity 5.1.3)
     
  38. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    I'm not understanding your code. Can you please post the rest of the function?

    For callbacks to work, you need to create a function that doesn't return any value, it will just modify the Localize.MainTranslation variable.
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using I2.Loc;
    5.  
    6. public class CustomCallback : MonoBehaviour
    7. {
    8.      public void OnModifyLocalization()
    9.      {
    10.           float percentDecrease = Mathf.Abs(myAbility.abilityEffectPercentage - 1) * 100;
    11.           string factionTarget = myAbility.targetFaction.ToString ();
    12.  
    13.           Localize.MainTranslation = Localize.MainTranslation.Replace("{TARGET_TYPE}", factionTarget);
    14.           Localize.MainTranslation = Localize.MainTranslation.Replace("{PERCENT}", percentDecrease.ToString());
    15.      }
    16. }
    17.  
    Then you need to assign that script to an object (commonly, you will assign it to the gameobject with the Localize component)

    And then in the Localize component, at the bottom, you need to select the OnModifyLocalization function from the callback dropdown.

    Also, in the Localize component, you need to select the term "mAbilityInitialHex" if that's the one with the formatted translations.

    Hope that helps,
    Frank

    PS. You can also add a debug line at the end of the OnModifyLocalization function to verify that it gets called:

    Code (csharp):
    1.  
    2.     Localize.MainTranslation = Localize.MainTranslation.Replace("{PERCENT}", percentDecrease.ToString());
    3.  
    4.     Debug.Log("Callback Result: " +  Localize.MainTranslation);
    5. }
    6.  
     
  39. charlesimaginary

    charlesimaginary

    Joined:
    Jul 23, 2015
    Posts:
    3
    Hi Frank,

    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.


    Here's the function with it

    Code (csharp):
    1.  
    2. public string GetAbilityDescription(Ability myAbility)
    3. {
    4.       string description = "Ability no description";
    5.  
    6. if(myAbility.abilityType == AbilityType.StartBuff)
    7. {
    8.    float percentIncrease = Mathf.Abs(myAbility.abilityEffectPercentage - 1) * 100;
    9.    string factionTarget = myAbility.targetFaction.ToString ();
    10.  
    11.    Localize.MainTranslation = Localize.MainTranslation.Replace("{TARGET_TYPE}", factionTarget);
    12.    Localize.MainTranslation = Localize.MainTranslation.Replace("{PERCENT}", percentIncrease.ToString());
    13.  
    14.    description = ScriptLocalization.Get("mAbilityInitialBuff");
    15. }
    16. else if(myAbility.abilityType == AbilityType.StartHex)
    17. {
    18.      float percentDecrease = Mathf.Abs(myAbility.abilityEffectPercentage - 1) * 100;
    19.      string factionTarget = myAbility.targetFaction.ToString ();
    20.  
    21.      Localize.MainTranslation = Localize.MainTranslation.Replace("{TARGET_TYPE}", factionTarget);
    22.      Localize.MainTranslation = Localize.MainTranslation.Replace("{PERCENT}", percentDecrease.ToString());
    23.  
    24.      description = ScriptLocalization.Get("mAbilityInitialHex");
    25.   }
    26.  
    27.   return description;
    28. }
    29.  
    This is the function that's hooked in the callback function:

    Code (csharp):
    1.  
    2. public void UpdateAbilityDescription()
    3. {
    4.    Ability currentAbility = GameManager.Instance.availableAbilities [currentAbilityID];
    5.    string description = GameManager.Instance.GetAbilityDescription (currentAbility);
    6.    cardDetailSkill.text = description;
    7. }
    8.  
    9.  
    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)
     
  40. Inter-Illusion

    Inter-Illusion

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


    Here is a modified code that should work for you:
    Code (csharp):
    1.  
    2. public string GetAbilityDescription(Ability myAbility)
    3. {
    4.     string description = "Ability no description";
    5.      
    6.     if(myAbility.abilityType == AbilityType.StartBuff)
    7.     {
    8.       description = ScriptLocalization.Get("mAbilityInitialBuff");
    9.     }
    10.     else if(myAbility.abilityType == AbilityType.StartHex)
    11.     {
    12.         description = ScriptLocalization.Get("mAbilityInitialHex");
    13.     }
    14.  
    15.     float percentDecrease = Mathf.Abs(myAbility.abilityEffectPercentage - 1) * 100;
    16.     string factionTarget = myAbility.targetFaction.ToString ();
    17.  
    18.     description = description.Replace("{TARGET_TYPE}", factionTarget);
    19.     description = description.Replace("{PERCENT}", percentDecrease.ToString());
    20. }
    21.  
    22. public void UpdateAbilityDescription()
    23. {
    24.    Ability currentAbility = GameManager.Instance.availableAbilities [currentAbilityID];
    25.    Localize.MainTranslation = GameManager.Instance.GetAbilityDescription (currentAbility);
    26. }
    27.  
    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.

    Hope that helps,
    Frank
     
  41. charlesimaginary

    charlesimaginary

    Joined:
    Jul 23, 2015
    Posts:
    3
    Hello Frank,

    Thank you for the explanation! I understand it better now.

    That code also worked perfectly, thank you very much for your help :)

    My only suggestion is to include some examples in the I2Languages documentation. It took me a while to actually find this feature, but so far it's an amazing plugin!

    -Charles
     
  42. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Will do!
    I have rewritten the documentation for I2L version 3. But it has taken forever to finish all the changes!
    As soon as I get the first beta for v3 I will release the new docs.

    Thanks,
    Frank
     
  43. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    I'm happy to announce that version 2.6.0f2 it's now available in the store.
    It includes lots of new features and improvements and I really hope it helps to make your game a global success!

     
  44. Cgtrendcom

    Cgtrendcom

    Joined:
    Nov 4, 2013
    Posts:
    3
    Hi Frank,
    Does working with Unity 5.1?
    Thanks
     
  45. Inter-Illusion

    Inter-Illusion

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

    Thanks!
    Frank
     
  46. DASOMJEON

    DASOMJEON

    Joined:
    Dec 6, 2013
    Posts:
    20
    Hello.

    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?

    Somi
     
  47. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    The plugin recognizes the real new lines characters, no need to fake it by adding \n.

    instead of doing
    "first line\nsecond line",

    just press enter in between the two lines:

    "first line
    second line"

    That should be cleaner to read for the human translators and more compatible when Auto-Translating using Google Translation.

    Hope that helps,
    Frank
     
  48. Cgtrendcom

    Cgtrendcom

    Joined:
    Nov 4, 2013
    Posts:
    3
    Thank you Frank.
    Unity 5.2 & I2 Localization works great. :)
     
  49. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello Inter Illusion,

    Does this work on Xbox One?

    Regards,
    Carlos
     
  50. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    I haven't tested myself on xbox one, but some users have used it for games for xbox 360 and it does work for windows 10 universal apps, so it should work fine on xbox one.

    Nonetheless, if you find any incompatibility, just let me know and I will try adding a fix asap.

    Thanks,
    Frank