Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    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. dev_dash

    dev_dash

    Joined:
    Jul 26, 2020
    Posts:
    13
    More question. How can I change or delete specific category name that already created?
    @Inter-Illusion,
     
    Last edited: Feb 22, 2023
  2. iLoveGamesDeveloper

    iLoveGamesDeveloper

    Joined:
    Aug 8, 2019
    Posts:
    12
    Hello!
    I have a question. I'm using LocalizedString to set the title/labels of prefabs that are instantiated at runtime, like Buttons, Tabs, and such. I set the .text of the text components when they are instantiated, however, when I change the translation, they are not modified. What is the best way to deal with this?
     
  3. unity_EE7C3E0634420E0CEC31

    unity_EE7C3E0634420E0CEC31

    Joined:
    Sep 30, 2022
    Posts:
    1
    Hi @Inter-Illusion , I'm having issues with displaying Arabic text with tags. For example, "كان <s>1</s>" gets displayed completely broken (<s>@@1[chinese char]@@ نﺎﻛ). Can you help me out?
     
  4. N8W1nD

    N8W1nD

    Joined:
    Sep 3, 2020
    Posts:
    7
    For the problem how to get an Audio clip by its key/term, for everyone in need of a solution like me and not wanting to invest 4h like I did..

    Code (CSharp):
    1. //Variable:
    2. private audioClip;
    3. private Localize localize;
    4.  
    5. //In Awake():
    6. localize = GetComponent<Localize>();
    7.  
    8. //In OnEnable():
    9. audioClip = LocalizationManager.GetTranslatedObjectByTermName<AudioClip>(localize.FinalTerm);
    @Inter-Illusion Please enter this snippet or some information about accessing audio to the Documentation in some form!

    This started as a reply to https://inter-illusion.com/forum/i2...translatedobject-audioclip-returns-null/reply on the I2 Forums, where answering was not possible for some reason. The complete answer is below.

    I had the same problem and found the issue:
    LocalizationManager.GetTranslatedObject<AudioClip>("EXAMPLE"); Expects an AssetName (the filename of the audio clip) as argument. GetTranslation gets this name (for some reason :D), thats why the solution below worked.

    The function, that does the intended is LocalizationManager.GetTranslatedObjectByTermName<AudioClip>(..);
     
    Inter-Illusion likes this.
  5. TomaszMolikRobot

    TomaszMolikRobot

    Joined:
    Jan 14, 2020
    Posts:
    25
    Hello,
    I was wondering if it is possible for I2Loc to search for I2Loc sheets on Shared Drives as well?
    Currently we have I2Loc sheets placed on someones My Drive and that works good.
    However we started using Shared Drives and wanted to move I2Loc sheets there but it looks like those are not found by I2Loc WebService.
    Is that possible to use sheets from Shared Drives?
     
  6. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    590
    There are a couple of ways.
    First, you could search all keys that contain the category text (a key internally has this format "category\key", so looking for the category text will show all that belong to that category).
    Once you have them all listed, click the button to select all and the delete.

    Another easy way that may give you more options is to Export your localization to Google Spreadsheet or to a local CSV file.
    Then open that file and delete the rows that you don't need. That way, you could also do bulk text replacements, etc.
    After you are done, just import it back to unity and your localization will be updated.

    Hope that helps
     
  7. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    590
    When you use a LocalizeComponent to translate a text, the component internally listens to the OnLocalize event.
    And when received, it re-translate the text.

    When using a LocalizeString to keep a text in your script translated. That object will know how to translate, but will not update until you query it again.
    In that case, your script should register to listen for the OnLocalize event and update the text. Something along this lines:
    Code (csharp):
    1.  
    2. public class MyClass : MonoBehaviour
    3. {
    4.     public LocalizedString Title;
    5.    
    6.     public TextMeshProUGUI TitleText;
    7.    
    8.     public void OnEnabled()
    9.     {
    10.         LocalizationManager.OnLocalizeEvent += OnLocalize;
    11.         OnLocalize();
    12.     }
    13.    
    14.     public void OnDisable()
    15.     {
    16.         LocalizationManager.OnLocalizeEvent -= OnLocalize;
    17.     }
    18.    
    19.     void OnLocalize()
    20.     {
    21.         TitleText.text = Title;   // Title will return the localization to the current language
    22.     }
    23. }
    24.  
     
  8. nindim

    nindim

    Joined:
    Jan 22, 2013
    Posts:
    130
    Hi @Inter-Illusion,

    I have fixed the issues with Arabic and rich text tags locally, the attached modified files are based on the current latest v2.8.21.

    The tags should be be written left-to-right to work correctly with the provided code. In Google Sheets, the icons to control the cell text direction only appear after you make an edit to a cell that could be RTL. Once you have set the cell as LTR, you should be able to edit the tags more easily.

    upload_2023-4-2_15-3-12.png

    Please also see my previous post where I provided a fix for "Booting in a RTL language causes Adjust Alignment to Malfunction" but the fix has been applied to the wrong line.

    All the best,

    Niall


     

    Attached Files:

  9. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,115
    @Inter-Illusion

    BaseSpecializationManager/GetCurrentSpecialization cannot build for Universal Windows Platform and New Input System. It uses "return (Input.touchSupported ? "Touch" : "PC");"

    Can you fix it?
     
  10. hermit_021

    hermit_021

    Joined:
    May 31, 2018
    Posts:
    6
    Hello I2 Localization Team,

    We are using the I2Localization asset for our game. We have done the entire setup. but I have been getting this type of error. We have right now working on these 4 languages (English (United States), Amharic, Oromo, and Somali). and This error comes when we click on the <b>Translate All</b> button.

    I think the error might be related to the "Oromo" language because it is not getting translated and if we remove that language everything works fine.

    We have attached the error screenshot.

    Our current setup is,
    Unity 2019.3.10f1
    I2Localization v2.8.21 f3

    Please let us know what we can do from here.
    Thanks,
     

    Attached Files:

  11. kayke

    kayke

    Joined:
    Oct 21, 2015
    Posts:
    42
    We are seeing an intermittent issue where a .LOC file is getting downloaded corrupted on device. It's only happening intermittently by a portion of our users. We can reproduce the error state if we replace our local LOC file with one of the malformed ones we get from a user.
    With the bad LOC, all GetTranslation calls from I2 just return null.

    Any ideas how to resolve/debug this further?

    This is a critical issue for us.

    Thank you!
     
  12. kayke

    kayke

    Joined:
    Oct 21, 2015
    Posts:
    42
    We found out some more details on the issue.
    We had a period where the headers where deleted on the google sheet which was causing the sheet to fail on load.
    We were able to resolve that issue by reverting the sheet. But we are seeing a very odd issue where intermittently the sheet from several revisions ago (the broken) one is getting pulled.
    Any idea why the older version of the sheet would intermittently get pulled as latest during the live sync process?
     
    ScottCoconut likes this.
  13. DanarKayfi

    DanarKayfi

    Joined:
    Aug 27, 2012
    Posts:
    72
    Hello ^_^
    First of all thanks for the awesome tool!
    I have a small issue with Kurdish Language

    First issue was it was not triggering the RTL, fixed it by adding "ku" in LanguagesRTL in LocalizationManager script (would love if you fixed that in future updates)

    Second issue is that the word is not connected, its separated! (attached some screenshots) is there a way to fix that?
     

    Attached Files:

  14. Grazer2

    Grazer2

    Joined:
    Jun 20, 2011
    Posts:
    78
    Hello,

    Question: What is the best way to use parameters with a LocalizedString? I sometimes use a localized string with a term assigned in the inspector and then assign that to a label in code. Is there a way to set the parameters in code without a ParamsManager component on the label? I'm basically looking for the equivalent of "some string param {0}".format("value") but using the LocalizedString and the {[]}-syntax.

    Thanks.

    edit: Of course there's "string".Replace("this", "that"), but it would be kinda nice to have this somehow wrapped in the i2 workflow.
     
    Last edited: May 8, 2023