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. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    This seems to be part of the Google security updates for some accounts.
    Google normally shows the message I posted in the images, but for accounts, when set to (School, or other organization) and/or you have turned on Advanced Protection for your account, then it shows the message you are describing and doesn't allow to sign in normally.

    You can either, Create or use another google account just for storing localization for your game and hosting your webservice.

    Or create an App Password and use it for login when setting the permisions (this only needs to be done once)
    https://support.google.com/accounts/answer/185833?hl=en

    Hope that helps,
    Frank
     
  2. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,130
    ok, I logged in second google account and process went through.
    Thanks.

    but about creating app password, created, but how to use? when login, use another account, then I should input google account email first, so just created password doesn't have meaning here.
     
  3. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,130
    and my main needs for translate is in script game message like,

    MessageManager.Instance.ShowTimedMsg("There is no upgrade or stat point to use", 1);

    How to use L2 system in this case?

    1. Make term by create key like "No upgrade point msg",

    and for English, "There is no upgrade or stat point to use"
    for Korean, "blah blah...."
    for Japanese, "blah blah..."

    and then how to use this key in script?

    MessageManager.Instance.ShowTimedMsg(L2.No upgrade point msg, 1); ??
     
  4. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    To access the location from script you could use the examples from:
    http://inter-illusion.com/assets/I2LocalizationManual/Howtoaccesslocalization.html

    Basically, you just do:
    Code (csharp):
    1.  
    2. string text =  I2.Loc.LocalizationManager.GetTranslation("MyKEY");
    3.  

    Another way to access localization is by using a LocalizedString
    http://inter-illusion.com/assets/I2LocalizationManual/LocalizedStrings.html

    These are strings that you can set to a term name, and will always return the localized text to the current language. They also have a custom inspector if you expose them in your scripts.

    Code (csharp):
    1.  
    2. LocalizedString locString = "Term2";
    3. LocalizationManager.CurrentLanguage = "English";
    4. string translation = locString;   // returns the translation of Term2 to English (e.g. 'This is an example')
    5.  
    6. LocalizationManager.CurrentLanguage = "Spanish";
    7. string translation = locString;   // returns the translation of Term2 to Spanish (e.g. 'Este es un ejemplo')
    8.  
     
  5. MikeSz

    MikeSz

    Joined:
    Jul 7, 2014
    Posts:
    23
    Seems that you missed my private message ;) Anyways:

    You mentioned adding AA to your TODO, is there any update on this? Was this feature added or will be added anytime soon? If not - what's the recommended way?

    What we would like to do is be able to replace loc sheets in a LIVE game that has several thousand players. Can't use "download from google on start" as this can end badly, thus we would like to update the loc file with the one downloaded from AA (or just downloaded, AA, AB, doesnt matter). Is that possible?
     
  6. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
  7. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    146
    Hi, reading the manual it says that there is a chance where the google sheet live update might get disabled if there's a lot of people accessing it. If that happens, what can be done? Also, if there a way to prevent it from happening without limitations?
     
  8. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,461
    This page may help: http://inter-illusion.com/assets/I2LocalizationManual/GoogleLiveSynchronization.html

    Instead of setting the 'Update Frequency' interval to 'Always', try e.g. 'Daily'. It depends on how large your player base currently is.

    The Google Sheet API has some usage limits - I don't know if "I2 Localization" uses this API (@Inter-Illusion is free to correct me):
    https://developers.google.com/sheets/api/limits


    .
     
  9. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    I2 Localization uses the free tier of the Web Scripts and internally it calls the Spreadsheet API.
    In the free tier, Web Scripts are limited by how long they run. (but given that every user that does a request just spend a few milliseconds in the web script), lots of users can connect daily and download updates.

    Said that, there IS a limit, and if you app is going to have millions of users, then they will hit the limit for sure. But once your app gets to millions of users, you should instead setup I2 Localization to synchronize from your own hosting/server.

    A very simple custom synchronization is shown here:
    http://inter-illusion.com/assets/I2LocalizationManual/ImportingaCSVfile.html

    See the code for the DownloadCSV which downloads a sheet from your server, and imports its content to be use in the game.
    A more advance flow can be set that first test against a manifest to see if there are changes, etc. But the idea is similar to the code in that example.

    In the mean time, while your app is growing, you can easily keep using the free tier of Google WebScripts and just set the Update Frequency as @Mauri suggested to Weekly or Daily.

    How that works, is that when if there are many users that and they reach the google limit. their update gets postponed until the next day when the limit resets. So, once you do a change in your spreadsheet, it can take a few days for all users to get the updated spreadsheet, but eventually they all will download the data.

    Another way, is to update your google account to a premium one and that increases the limit.

    Hope that helps,
    Frank
     
  10. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    146
    Thank you for explaining in detail! Appreciate it.
     
  11. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,539
    Hello, I have some improvement to submit.

    upload_2020-8-6_12-25-12.png

    This tool is valuable but it is not able to search for `LocalilzedString`. It returns 0 count even though they are used in serialized LocalizedString declared on various components.

    I have made some changes to the files attached. It is able to search for `LocalizedString` usages as count, and also allow clicking on the count to highlight the game object just like count from Localize component. It would be great if you consider add this fix

    And fix other related bugs created from my fix that I am not aware of. One thing I can think of is that when you aren't using the parse tool yet and just coming into the scene, it didn't count LocalizedString usage yet. (and other related count number updating when removing, adding terms) But I am fine on clicking parse manually for now.

    Now it is able to count a completely custom component owning the `LocalizedString`, with no normal Localize component.

    upload_2020-8-6_12-29-52.png

    upload_2020-8-6_12-29-32.png
     

    Attached Files:

    Last edited: Aug 6, 2020
  12. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Thanks for taking the time to add support to tracking usage count to LocalizedStrings.
    Will check the changes and add them to the next release.

    Thanks!
    Frank
     
  13. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,539
    Hi, currently in 2019.4 I noticed that removing a term from source will cause 3 errors to be thrown about EndVertical not being paired in LocalizationEditor.cs

    Code (CSharp):
    1. EndLayoutGroup: BeginLayoutGroup must be called first.
    2. UnityEngine.GUILayout:EndVertical()
    3. I2.Loc.LocalizationEditor:OnInspectorGUI() (at C:/Users/5argon-PC/Documents/Unity Projects/Internal Packages/AssetStorePlugins/Assets/I2/Localization/Scripts/Editor/Inspectors/LocalizationEditor.cs:182)
    4. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    After some debugging I found that the EditorUtility.DisplayDialog in RemoveTermsFromSource() in Scripts\Editor\Localization\LocalizationEditor_Terms.cs ended up calling the OnInspectorGUI() code by an additional 1 round, while in the middle of drawing the list of terms.

    Here's normal round

    upload_2020-8-7_3-11-30.png

    Where logs are added to each Vertical begin/end

    upload_2020-8-7_3-12-18.png

    And "Start" + "Finish" in a term row drawer.

    Here's the extra round that got called in the middle of normal round, calling source is DisplayDialog

    upload_2020-8-7_3-11-54.png

    This itself maybe a Unity bug, but the fact that the extra round completed entirely, and when resuming the normal round, and it already forgot that what should "Finish" pair with and produce errors, maybe an another bug. This prevents checking more than 1 term and bulk delete as the error will early out before the next one could be processed.

    As a hot fix, I have commented out the confirmation dialog though it is not ideal it restore the functionality. I hope maybe you could figure something better out or get some reproduce case to send to Unity.

    *The same thing seems to happen when clicking Import-Merge on Local CSV in the first tab, for example, errors are thrown after canceling out of the popup dialog
     
    Last edited: Aug 6, 2020
  14. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,539
    In 2019.4, maybe because of new UI, in the file where you draw each term row, the GUITools.DrawSkinIcon(rect, "CN EntryWarnIcon", "CN EntryWarn") cannot draw the warning icon where you use an undefined terms anymore.

    I found that by instead defining a new draw method such as

    Code (CSharp):
    1. public static void DrawEditorIcon(Rect rect, string iconName)
    2. {
    3.       var texture = EditorGUIUtility.FindTexture(iconName);
    4.       GUI.DrawTexture(rect, texture);
    5. }
    And use "console.warnicon.sml" as the icon name we could draw the icon again.

    Then, also the function where the row should be yellow when there is no translation provided is no longer working. The row is always white. This is maybe that some of new Unity styles no longer has background to be colored.
     
    Inter-Illusion likes this.
  15. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Thanks for letting me know, will check that asap!
     
  16. diccon

    diccon

    Joined:
    Sep 13, 2013
    Posts:
    19
    Hello, I have recently purchased I2 Localization and I'm impressed so far. There are a couple of small things that I'm wondering if there are known solutions for.
    The first is in the language asset inspector (see image). There is a large amount of whitespace in the middle of the term name label which makes it impossible to read the entire category, I've tried resizing the window every which way but I can't seem to make it go away. Some of the terms in the screenshot were generated by Dialogue System but others were generated by hand and do not contain whitespace.


    Is there anything I can do to get the full category name to display properly?

    The second is caused by the auto-translate, I am aware that this uses google translate so is not entirely in your control, but this may be a common enough problem that there might be a workaround. When translating a phrase with a lua variable from DialogueSystem, the translation adds a space (see image). Is there any way to prevent this space from being added? We will certainly use a translation service for our final terms but it will be a pain if we have to correct this each time during development.
     
  17. stevencoull

    stevencoull

    Joined:
    Sep 15, 2016
    Posts:
    16
    Hey, just wanted to start by saying thanks for the fantastic asset - I don't know what we'd do without it!

    The team and I having an issue with one of our projects where Unity crashes when we try to select a term from the term dropdown menu, in the Localize component. I can view all terms in the I2Languages 'Terms' tab, and translations all work as normal. I thought we might have too many terms, but if that's the case I would have expected the Terms tab to cause a crash too. I've moved the I2 folder to a new project too and can replicate the problem. Using version 2.8.13f2.

    Do you know if there is an upper limit to the amount of terms I2 can handle? We have 1635 rows right now spread over 29 tabs with 4 different languages. If not, is there any particular symbols/characters that might be causing an issue?
     
  18. CHOPJZL

    CHOPJZL

    Joined:
    Dec 5, 2016
    Posts:
    54
    Hello!
    I am wondering if I2 can set different language for different type of resources?
    For example: Text is in languageA and audio is languageB.
     
  19. AlexNanomonx

    AlexNanomonx

    Joined:
    Jan 4, 2017
    Posts:
    35
    Hi, could you add support the AppName translations for the Mac App Store? I guess it should be very similar to iOS. Though knowing Apple, different in some annoying and arbitrary way.

    I'm going to use your source code to try and get something going myself. But it'd be handy for maintenance if you could look into this.
     
  20. brockemon

    brockemon

    Joined:
    Dec 21, 2012
    Posts:
    35
    I recently changed a bunch of text UI from built in Text to TextMeshPro. I also changed the Localize target to TextMeshPro as I went. It looks like the prefab target is the default when you remove the Text box and you have to manually switch it to TextMeshPro after you add the component.

    I have noticed some components are defaulting to instantiating a prefab target instead of TextMeshPro even though I am sure the inspector says TextMeshPro is the target for localization. Is there something I could have missed?

    I suspect this is causing a crash in the project on some android devices when it attempts to instantiate a prefab that is just a nonsense localization term.

    Edit:
    Found the issue. Unity was removing the build script define TextMeshPro which was removing your TextMeshPro target from Cloud Builds. Not sure why 2019.2.* stream of unity is turning that define on and off but work around was to force that script define on unity cloud build at all times.

    i have also manually turned off the prefab target.
     
    Last edited: Aug 29, 2020
    Inter-Illusion likes this.
  21. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Sorry for the late reply, the forum was not notifying me of replies in here. Sorry.

    I'm working on a new update to the plugin, will try adding support for the Mac App Store name localization.
    Thanks for the suggestion!

    Multiple languages visible at the same is not supported by default, but there are work arounds:

    http://inter-illusion.com/forum/i2-localization/189-select-language-term-by-term#534
    http://www.inter-illusion.com/forum/i2-localization/209-multiple-languages-at-the-same-time

    The plugin has been optimized so that even the Term's list can show more than 100000 terms without problems, in fact, one of the test I run is with a LanguageSource with 300K terms and 6 languages.
    So, the crash shouldn't be related to managing the terms. However, for the popups, I'm using the Unity IMGUI popup. I'm not aware of any issue in the latest version of unity with the popup and large list of options, but I will not be surprised either if some regression was added.
    Can you please, email me the console log (or the Editor logs) showing the crash. From there I may be able to give you a better solution.

    Hope that helps,
    Frank
     
  22. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    56
    Hi, I have updated the plugin to 2.8.13 f2 version, and now I'm having the same issue with symbols in key names.
    In that time I was able to make it work with the beta version that you gave me access.

    These are the kind of keys that don't work.

    upload_2020-9-3_17-18-38.png

    There is a way to prevent the keys modification at all? Thanks!

    I know that those are horrible names for the keys, but for several reasons that's something that we can't change in that project.
     
  23. Olipool

    Olipool

    Joined:
    Feb 8, 2015
    Posts:
    155
    Hi,
    I just discovered your plugin and of course, at this point in time, I already implemented everything translation-related myself which is kinda silly in hindsight :D I am not so sure yet if I hop over to i2 and change everything because it will be a lot of work for a more or less finished project. But next time I guess I will start with it from the beginning.

    I have two questions though:
    1. I am using TexMeshPro including its feature to use sprites inside of the text. For example, I have a string like "To use an object use [CTRL]". In a first step, I will choose the right translation for that and in a second one, I will replace [CTRL] with the <sprite>-tag to insert an image of the ctrl key. But for other languages like German, I also translate this sprite in the second step to the strg key (ctrl is called strg in German). So I was wondering if I could do something like that in i2 directly or can I somewhere in the code sneak in the second replacement function?

    2. I saw that your support for Arabic handles the multiline problem of wrapping text well. Does it work with TextMeshPro as well? And since I am using the free Arabic Support plugin where lines get swapped in the wrong order...any chance you might give me a pointer how the line handling was solved? If you tell me the part in the scripts I can also buy i2, no problem, I am just a bit lost with this wrapping problem right now ;)

    Thanks!
     
  24. JonathanFri

    JonathanFri

    Joined:
    Jul 3, 2019
    Posts:
    10
    Hello,
    we are using i2 Localize 2.8.12 f1 for our project. We recently startet using params. For example we are replacing {[downloadsize]} with a number of 36. Localize then searches for a loca id named 36 and places that instead of 36 which is driving us crazy. We found a boolen named "allowLocalizedParameters" but that simply breaks setting parameters as this bool seems to be checked at the wrong line in i2 loca source.

    In Localization_Parameter in line 82 it checks
    "if (result != null && allowLocalizedParameters)"

    but shouldnt this "allowLocalizedParameters" check before quering the Language data for translations to prevent exactly that?

    Even if thats correct, how would we prevent localizing parameters?
     
  25. diccon

    diccon

    Joined:
    Sep 13, 2013
    Posts:
    19
    I didn't get a reply for my previous post but I am still having a problem using I2 with Dialogue System and getting spaces inserted by Google Translate. e.g [var=Variable["index"].name] becomes [var = Variable["index"]. name] which causes the logic in Dialogue System to break.

    Is there a way to remove the spaces that come back from the translator somehow? Or even have some markup that would keep the text in its original form? e.g. [notranslate[lua(somecode)]]

    I read the docs on Parameters which seem to be similar to what I need, but what I need is a parameter markup that returns the untranslated text of the term.
     
  26. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    I2 Localization has the tags [i2nt][/i2nt] to avoid translating whats inbetween them.

    For example:
    "This is an example [i2nt][var=Variable["index"].name][/i2nt] text".

    That will not translate the "[var=Variable["index"].name]" section.

    Hope that helps
    Frank
     
    diccon likes this.
  27. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    You are correct, the check was in the wrong location and was disabling the entire Parameters and not just the Localization of the parameters.
    I included the fix in the next update (which I will send to the store this week)

    In the mean time, you can move the check to be like:
    Code (csharp):
    1.  
    2. var result = (string)getParam(param);
    3. if (result != null)
    4. {
    5.     if (allowLocalizedParameters)
    6.     {
    7.         // check if Param is Localized
    8.  
    Hope that helps,
    Frank
     
    JonathanFri likes this.
  28. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    For future reference:
    The new version of I2 Localization (v2.8.14) now allows skipping google sync from scripts.

    Just create an script inhering from RegisterCallback_AllowSyncFromGoogle and add it to your first scene:
    Code (csharp):
    1.  
    2. using System;
    3. using UnityEngine;
    4. using I2.Loc;
    5.  
    6.    public class AllowSyncFromGoogle : RegisterCallback_AllowSyncFromGoogle
    7.    {
    8.        public override bool AllowSyncFromGoogle( LanguageSourceData Source )
    9.        {
    10.            if ( IsAsianMarket() ) return false;
    11.                                     else return true;
    12.        }
    13.    }
    14.  
    Hope that helps,
    Frank
     
  29. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi, You can prevent changing the term names by modifying the function GetValidTermName in Assets/I2/Localization/Scripts/Utils/I2Utils.cs

    Hope that helps,
    Frank
     
  30. diccon

    diccon

    Joined:
    Sep 13, 2013
    Posts:
    19
    Thanks yes that looks like what I need.

    I have a new problem now that just started happening - the Translate All Empty Terms button on the Languages tab is not returning any results. You can see here it is translating 131 terms into French:



    But the results never arrive:



    However if I use the Translate button on the Term it works successfully, but I don't want to do this 130 times...

    I went to my google apps page and it seems that the error rate is quite high, not sure if that has anything to do with it?



    This feature has been working for me previously so I wonder what is happening now, I have tried the latest update and the previous version. Thanks for your help.
     
    Last edited: Oct 13, 2020
  31. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    Given that the plugin uses the free tier of google translate, there are limits to how many translations, the size of the translated text, and how often can you query google for translations.

    When you click to automatically translate all terms to a language, the plugin batches into a text as many terms as possible and queries Google for the translation, then extracts the translations from the resulting text. After that it batches a new group of terms and tries querying google again.

    But when there are a big number of terms, Google stops accepting requests for a while, so the translation of the remaining terms fails. Sorry about that, but we can't avoid the limits of the free google translate :-(

    To solve the issue, you can try later clicking the same Translate All button. Each time you do, the plugin will translate at least some of the remaining terms, depending on how many you have, it can take a few times, but eventually all terms will get translated.

    Another, better option when having lots of terms is skipping the translate all button, and instead exporting to the spreadsheet and replacing all its cells with the GOOGLETRANSLATE function. That will guarantee that all the terms are translated as it "kind of" bypasses the free tier limits (although it can take a few seconds for everything to be translated).

    Said that, remember that this limits only happen in the editor when generating the translations using Google Translate, after you have all terms translated, the game doesn't rely on Google for translations and there is no limits for querying the stored translations.

    Hope that helps,
    Frank
     
  32. diccon

    diccon

    Joined:
    Sep 13, 2013
    Posts:
    19
    Oh yes that makes sense, now I understand I can work around it, once we're using a real translator it will be fine but I'm just setting up the systems right now.
     
  33. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    77
    @Inter-Illusion Hello, sorry if this was asked before, I'm doing a lot of spreadsheet updates, so I made an editor tool to one click and import the spreadsheet using LocalizationManager.Sources[0].Import_CSV method. I would like to also be able to generate the script, but the methods in LocalizationEditor_Tools_Script class are private and difficult to work with, especially selecting all new terms.
    Would be nice if you could provide a nicer API for this operation. Thanks!
     
    Last edited: Oct 22, 2020
  34. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    300
    We would like to allow our community to provide translations for languages not supported by the game. To make this work, a user would clone our google spreadsheet, add a column for the new language, and then export to csv and upload the csv to Steam Workshop so other users can install it.

    The question is how can we make I2 Localize load the strings from this csv rather than the ones which are embedded into I2Languages.
     
  35. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    I have been working in refactoring the Editor. As part of that work, I'm separating all the tools to be able of using them from other scripts (not just the LanguageSource editor).
    Hopefully, that will be ready for the next update.

    You can use the Import_CSV function to load a CSV file at runtime.
    This link has information on how to use it to load from different locations (even to download it from a website)
    http://inter-illusion.com/assets/I2LocalizationManual/ImportingaCSVfile.html

    Hope that helps,
    Frank
     
    Grumpy-Dot likes this.
  36. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    341
    @Inter-Illusion Is it possible to add terms by code? We have a few custom windows with lots of data and I was wondering If it's possible to interact by code with the asset and create the terms by code from there.
     
    Last edited: Nov 14, 2020
  37. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
  38. jlanisdev

    jlanisdev

    Joined:
    Jan 18, 2016
    Posts:
    68
    @Inter-Illusion On the spreadheets tab, you have 3 different import/export buttons: "Replace", "Merge", and "Add New". I assume I know what "Merge" does, but what's the difference between the other two? Also, why is this not anywhere in the documentation?
     
  39. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    It is in the documentation, but just an small mention and not a better description of each individual button:

    From the doc:
    http://inter-illusion.com/assets/I2LocalizationManual/GoogleSpreadsheets.html
    On each of the Import/Export sections, there are buttons to replace all the existing data with the new one, only changing (Merging) the existing elements in both the new and the old data and to only add the new terms/languages.


    Basically,
    Replace All: Deletes all your data and downloads new one from the spreadsheet.
    Merge: Downloads any new terms, changes the terms that are different, but doesn't delete the terms you already but that are not in the spreadsheet.
    Add New: Just downloads the new terms/languages. Doesn't delete or modifies any one you already have.

    Hope that helps,
    Frank
     
  40. vertxxyz

    vertxxyz

    Joined:
    Oct 29, 2014
    Posts:
    62
    Hi, there used to be a memory leak in 2.8.12 where I2 held onto localisation targets (eg. TextMeshPro Monobehaviours) when using the Localize component. We've found that when reloading our scene (additively) TMP's data duplicates, and it's referring to the same content.
    This is caused by the Localize component not destroying its ILocalizeTarget (mLocalizeTarget) when it is destroyed.
    This has been "fixed" in 2.8.13 by calling Resources.UnloadUnusedAssets when the scene additively reloads. But it'd be best to just solve the problem at its source and Destroy the ILocalizeTarget in Localize's OnDestroy, improving performance and stopping the leak at its source.
     
  41. jlanisdev

    jlanisdev

    Joined:
    Jan 18, 2016
    Posts:
    68
  42. yomanx

    yomanx

    Joined:
    Dec 5, 2016
    Posts:
    38
    Hi @Inter-Illusion

    Can i know, when we delete some translate TEXTS in google docs, what should happen in game?

    Why we get misses in text? Can we get KEYS in empty places?
     
  43. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    If you have Google Live Synchronization enabled, then when you modify the spreadsheet, the game will automatically download it and replace the copy it has.

    If you remove any key that is needed by the game, it wont be able to find a translation and will use a fallback.
    In the LanguageSource there are settings to define what happens when a missing key is found.
    For example, you could make it so that it shows the key name, or the text "Missing Key", fallback to English, etc.

    One good way to allow for continue developing new versions of the game after it has been released, is to make a copy of the spreadsheet every time you release a version of the game. That way, you can keep editing the new spreadsheet, but the released game will not be affected by those changes.
    Then, if you find an error in any translation on a released game, you just open the spreadsheet of that game version and fix the translation.

    Hope that helps,
    Frank
     
    Last edited: Dec 4, 2020
    yomanx likes this.
  44. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    341
    I've noticed if we use the LocalizationParamsManager combined with the plurals detection if fails if we pass a parameter with a separator, like for example we are using the '.' for thousands and if we set it on the parameter what happens is it shows in the translation text the 3 different forms: "You have {[POINTS]] poiints[i2p_Zero]You have no points[I2p_One]You have 1 point"
    Is there any way to go around this and be able to show the formatted number?
    Thanks
     
  45. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    When using parameters with I2 Localization, its better to pass the actual number and not the string representing that number.

    When passing an object that is not an integer, the plugin cast the object to string and then uses int.TryParse to convert it to int.
    If the device you are using has a system locale that doesn't use separators for the thousands or uses a different format, then the int.TryParse will not work.
    That's why you are seeing that issue.

    If instead, you pass the parameter directly as an int, then it will convert it correctly.

    Hope that helps,
    Frank
     
  46. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    341
    But what I would like to know is could I show It with the thousand's separator.
     
  47. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    341
    I just realized my game on device is not syncing with the google sheet at all.
    I had the Update Frequency set to ALWAYS and adding / modifying terms from the excel sheet didn't take any effect at all. I also tried uninstalling and installing again and these new values didn't get synchronized either.

    Then I tried setting auto-update to NEVER and calling :
    Code (CSharp):
    1. I2.Loc.LocalizationManager.Sources[0].Import_Google(true,false)
    And still nothing. Am I missing something?
    Any hint of why this could be happening?
    Thanks in advance

    PS: we didn't released yet, just me and another guy testing so it can't be google's limits are reached.
     
    Last edited: Dec 16, 2020
  48. jmdeb

    jmdeb

    Joined:
    Jul 28, 2017
    Posts:
    16
    Hi, is there something broken or that I should now with the "Parse" function? When I parse the whole scenes and scripts it tells me that all terms are used even if I'm sure (I've created terms only for testing and not used them) that they are not!
     
  49. AsifNaeem

    AsifNaeem

    Joined:
    Apr 12, 2016
    Posts:
    12
    Hi!

    I was exploring your plugin “I2 Localization” on Unity 3D asset store.
    You create such a powerful plugin, and I am interested to buy it.


    But before, I want more detail about your latest release 2.8.14f1. In that release you added support for localizing Video Player.
    I explored plugin documentation and video for help, but did not find any section about video localization.
     
  50. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    542
    Hi,
    I'm not aware of the Parse tool been broken, I just ran it in my test projects and seems to behave correctly. If its telling you a term is in use, but you can't find it, try opening all scenes at the same time (or one by one) and run the tool, the list will update the usage counter and if you click that number it should highlight the object using that term.

    Yes, the latest release added support for localizing the VideoPlayer component. It works just like localizing audio, textures or sprites.
    Just add a Localize component to the object that has the VideoPlayer component. Create a term for it and assign the video you want to play in each language.
    When running the game, the Localize component will change the video to the one corresponding to the current language.

    Hope that helps,
    Frank
     
unityunity