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. mpulkkinen

    mpulkkinen

    Joined:
    Apr 8, 2013
    Posts:
    15
    Same here, we have a lot of terms, around 5500 now, and with ~6 languages, google export started throwing Internal server error 500 (+upload started to get really really slow) when uploading, so we had to add temp string to all empty terms/languages to prevent auto-translate. After that, everything started to work again...
     
  2. Turborilla

    Turborilla

    Joined:
    Sep 10, 2014
    Posts:
    5
    We're in need of localizing formatted text, will that be supported any time soon ?
     
  3. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    What you mean by "formatted text"?

    Are you referring to localizing "The player color is {0}"?
    The plugin supports that by using LocalizationCallbacks
    http://inter-illusion.com/assets/I2LocalizationManual/Callbacks.html

    That way you can localize the text and also the content that replaces {0}
    Example: (notice how even the color is localized)
    English "{PLAYER} wins" turns into "Red wins"
    Spanish: "El {PLAYER} ha ganado" turns into "El Rojo ha ganado"

    Hope that helps,
    Frank
     
  4. Turborilla

    Turborilla

    Joined:
    Sep 10, 2014
    Posts:
    5
    Close, but more like "You have 3 friends", where 3 is a variable.
    The example you gave seems to only work with constants ?
    I noticed that plurals was grayed out in the plugin.
     
  5. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    You could use the same approach to attach numbers:

    Code (csharp):
    1.  
    2. public string[] FriendsName; // List of friends (this can be located in another class)
    3.  
    4. public void OnModifyLocalization()
    5. {
    6.        // if no MainTranslation then skip (most likely this localize component only changes the font)
    7.        if (string.IsNullOrEmpty(Localize.MainTranslation))
    8.               return;
    9.  
    10.        // get translation of Red color into the current language
    11.        string NumFriends = FriendsName.Length.ToString();
    12.  
    13.        // set the color in the correct location
    14.        Localize.MainTranslation = Localize.MainTranslation.Replace("{NUM_FRIENDS}", NumFriends);
    15. }
    16.  
    English "You have {NUM_FRIENDS} friends" turns into "You have 3 friends"
    Spanish: "Tienes {NUM_FRIENDS} amigos" turns into "Tienes 3 amigos"

    >>I noticed that plurals was grayed out in the plugin.

    I started adding support for Plurals but haven't been able to finish implementing it.

    A workaround it's to create separate terms for the different variants:
    MYTERM: "You have {NUM_FRIENDS} friends"
    MYTERM_Zero: "You have no friends"
    MYTERM_One: "You have 1 friend"


    then, add "_Zero" or "_One" at runtime:
    Code (csharp):
    1.  
    2. public string[] FriendsName; // List of friends (this can be located in another class)
    3.  
    4. public void OnModifyLocalization()
    5. {
    6.        // if no MainTranslation then skip (most likely this localize component only changes the font)
    7.        if (string.IsNullOrEmpty(Localize.MainTranslation))
    8.               return;
    9.  
    10.        // get translation of Red color into the current language
    11.        string NumFriends = FriendsName.Length.ToString();
    12.  
    13.        // Modify the translation if the number is 0 or 1
    14.        if (NumFriends==0)
    15.               Localize.MainTranslation = ScriptLocalization.Get( Localize.CallBackTerm + "_Zero" );
    16.        else
    17.        if (NumFriends==1)
    18.               Localize.MainTranslation = ScriptLocalization.Get( Localize.CallBackTerm + "_One" );
    19.  
    20.        // set the color in the correct location
    21.        Localize.MainTranslation = Localize.MainTranslation.Replace("{NUM_FRIENDS}", NumFriends);
    22. }
    23.  
    As soon as finish implementing pluralization, this will be done automatically, but for the moment, you will have to use a code similar to this if you need the plurals to be treated differently.

    Hope that helps,
    Frank
     
    v_James_v likes this.
  6. jsoucy

    jsoucy

    Joined:
    Jun 17, 2013
    Posts:
    15
    Hi. Running into an issue on my local machine. This is not occurring with other devs on my team. When I play our game, and if spanish is anywhere in the list of languages. My game defaults to Spanish. My system doesn't have spanish enabled and I have tried uninstalling and reinstalling Unity. Anyone familiar with this issue?
     
  7. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    Here is a description of how the initial language is selected:
    http://inter-illusion.com/assets/I2LocalizationManual/InitialLanguage.html

    My guess is that Spanish is saved in your PlayerPrefs. Did you tried deleting them?

    delete by running this code: http://docs.unity3d.com/ScriptReference/PlayerPrefs.DeleteAll.html
    or by deleting the registry folder (WIN): HKCU\Software\[company name]\[product name]
    http://docs.unity3d.com/ScriptReference/PlayerPrefs.html

    If that still doesn't solve it, you could try debugging the function
    SelectStartupLanguage in LocalizationManager.cs
    Just place a breakpoint and see where does Spanish comes from.

    Hope that helps,
    Frank
     
  8. jsoucy

    jsoucy

    Joined:
    Jun 17, 2013
    Posts:
    15
    Thank you so much for the help! Deleting the registry keys did the trick. Love mthe product!
     
  9. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I am trying to use this asset. I am looking at the Language Source. I am on the Languages tab. When I click on Translate button I get an error, "Unable to access Google or not valid request". Is there something I need to setup?
     
  10. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    Yes, you need to install the WebService and click Verify to check that it communicates fine with google.
    Previous version of the plugin contacted Google directly and then parsed the resulting Google Translate web, but that was too slow and prone to fail when several translations were requested.
    In this last update, I changed the translation path to use the WebService which internally uses the Google Translate API functions so, its faster than parsing the Google Web result. However, for that to work, the webService needs to be installed in your Google Drive.

    Hope that helps, and thanks for letting me know about this, I forgot to add a better fail message so that you could know the webService is missing or not an old one is used. I will add that in the next beta.

    Also, please be aware, that this last version uses a new WebService, so if you had the plugin previously, and already installed the WebService, you may need to delete it and re-install it for it to work correctly.

    Hope that helps,
    Frank
     
  11. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I think I have already set that up. When I click on verify, things blink, but I don't get any notification that things are or are not working.

     
  12. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    Hello,

    Some terms are not included in build but are totally working when in editor. We're building to Windows PC. What can we do to fix this?
     
  13. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
  14. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Hi, I'm looking into a replacing my own home-grown localization system with something more robust. I've skimmed through this thread, your forum, and the docs, but I have several questions before I make the plunge.

    1. I noticed you had mentioned a few times about including plural support. Do you have a time frame for that? Also, possible date conversion and things like that?

    2. For a lot of my buttons and UI elements, I'm loading or modifying them through code. Are all the options in the Localize component accessible by script?

    3. I'd primarily like to import csv localization files at runtime for modding. I read that you have included the ability to import multiple tabs from a Google sheet. Is it possible to output these to separate csv files for readability without modifying the source code, or are they all exported to one large csv file?

    Thanks.
     
  15. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    I'm moving the code toward supporting Parameters that could be hooked up to the Localize component, which in turn, will allow adding Plurals. The branch I have for this feature is fairly complete, but it depends on another feature I'm working now that is extending the Normal/Touch variations to support more input types (and also custom ones: e.g. xbox controller, vr, etc).
    Both of this features (input variations and plurals) will use the same underlying code to manage the variations, that's why as soon as I finish this one I will be in good shape to release full plural support. (but given that I prioritize bugs and stability fixes than features, the timeline will be a couple more full releases before plurals are fully supported: 2.6.8 or 2.6.9).

    Said that, the plugin implements callbacks, which can be used to add parameters to the localization (e.g. "you have {0} points" -> "you have 3 points").
    That same callback can be used to request another translation based on how many points you have. In this case, if the original term was "Score_Many" = "you have {0} points", when in the callback, if the number of points is 1, then you can re-request the term "Score_One" = "you have {0} point".

    If you need help setting that up, just let me know and I can provide an example for you.

    The full code of the plugin is provided and everything is accessible.
    I have listed the most used API in these pages, but there are lot of more things that can be easily accessed.

    http://inter-illusion.com/assets/I2LocalizationManual/HowtochangecurrentLanguage.html
    http://inter-illusion.com/assets/I2LocalizationManual/Howtoaccesslocalization.html
    http://inter-illusion.com/assets/I2LocalizationManual/DynamicInGameTranslations.html
    http://inter-illusion.com/assets/I2LocalizationManual/ImportingaCSVfile.html

    If you find anything that you need but can't find, please let me know and I will point you in the right direction, and try to increase the documentation with that use case.

    Terms can be categorized ("Tutorial/Welcome message" and "Menus/Play").
    When exporting, there will be a Sheet for each Category.

    If you need to export a csv file of only a few selected categories, there is a function LanguageSource.Export_CSV(..) that accepts the category you want to export, and it will only export the terms in that category.

    Hope that helps,
    Frank
     
    Korindian likes this.
  16. Link538

    Link538

    Joined:
    Jan 25, 2013
    Posts:
    15
    Hey, I see you've added a charset tool to be able to create font atlases, however the text area showing the characters cannot be copied, which is pretty much useless without it...

    I just add to replace :
    GUILayout.TextArea (mCharSet ?? "");
    by
    EditorGUILayout.TextArea (mCharSet ?? "");

    By the way, the line above throw a NullReferenceException the first time the editor is opened
    GUILayout.Label ("Used Characters: (" + mCharSet.Length+")");
     
  17. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    Thanks for the reporting this issue. Fortunately, I already fixed it in one of the 2.6.6 betas, if you download the latest from the Beta folder, the textbox will be selectable so you could copy the characters and there are no NullReferneceExceptions :)

    Hope that helps!
    Frank
     
  18. Link538

    Link538

    Joined:
    Jan 25, 2013
    Posts:
    15
    Where do I find this Beta Folder?
     
  19. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
  20. Oriam

    Oriam

    Joined:
    Nov 11, 2012
    Posts:
    23
    Hi Frank,

    I think that you use CSV files to store the localization data. Most of the times we include commas in our UI text (about text or tutorial phrase for example), which means, in the past we had to modify the NGUI localization system (we have been using that system). Our modification does the job, but it is far from ideal. My question is, does the I2 system provides an easy way to include commas (",") in the localization data? Can we include other special characters (quotes for example)?

    Thanks in advance,
    Oriam
     
  21. VirtualisDev

    VirtualisDev

    Joined:
    Jul 21, 2015
    Posts:
    30
    Hello,


    I have some difficulties to localise a dropdown element (Unity UI). Is there any tricks to do so ?
     
  22. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    I just emailed you an script that allows localizing Dropdowns.

    I will be adding this script to v2.6.6b2 as well as adding a custom inspector so that the terms could be selected from a dropdown similar to the Localize component. Also adding support for Dropdowns of Sprites.

    Hope that helps!
    Frank

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using UnityEngine.UI;
    4.  
    5. namespace I2.Loc
    6. {
    7.     [AddComponentMenu("I2/Localization/Localize Dropdown")]
    8.     public class LocalizeDropdown : MonoBehaviour
    9.     {
    10.         public string[] _Terms;
    11.      
    12.         public void Start()
    13.         {
    14.             LocalizationManager.OnLocalizeEvent += OnLocalize;
    15.         }
    16.      
    17.         public void OnDestroy()
    18.         {
    19.             LocalizationManager.OnLocalizeEvent -= OnLocalize;
    20.         }
    21.      
    22.         public void OnLocalize()
    23.         {
    24.             if (!enabled || gameObject==null || !gameObject.activeInHierarchy)
    25.                 return;
    26.  
    27.             if (string.IsNullOrEmpty(LocalizationManager.CurrentLanguage))
    28.                 return;
    29.          
    30.             UpdateLocalization();
    31.         }
    32.      
    33.         public void UpdateLocalization()
    34.         {
    35.             var _Dropdown = GetComponent<Dropdown>();
    36.             if (_Dropdown==null)
    37.                 return;
    38.          
    39.             _Dropdown.options.Clear();
    40.             foreach (var term in _Terms)
    41.             {
    42.                 var translation = ScriptLocalization.Get(term);
    43.                 _Dropdown.options.Add( new Dropdown.OptionData( translation ) );
    44.             }
    45.             _Dropdown.RefreshShownValue();
    46.         }
    47.     }
    48. }
    49.  
     
  23. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    When updating to the latest version 2.6.6b1 by following the procedure on the FAQ, I find that the new imported version is overriding my previously exported ScriptLocalization script. This happens even if I move the ScriptLocalization script outside the I2 folder into another folder. Once I delete the previous I2 folder and import the new one, that script gets overwritten no matter where it is and drops all the previously created terms, creating a lot of compile errors afterwards. I can't access the I2Languages prefab to regenerate ScriptLocalization due to those compile errors.

    I thought I could get past this by renaming either ScriptLocalization.cs or the class name or both before deleting the old and importing the new version, but regardless it always gets overridden. How do I preserve the script through the update process other than copying the data to a clipboard and pasting?

    P.S. There's also a couple of console warnings with Unity 5.4 beta 22, namely one inconsistent line ending and OnLevelWasLoaded being deprecated.
     
    Last edited: Jun 27, 2016
  24. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    I'm sorry about this issue.
    In the latest versions of the plugin I accidentally included the ScriptLocalization.cs.
    Previously that file and the I2Languages.prefab where generated only if they were not found (i.e. fresh install). That allowed to keep the changes you had made.
    In the next release, I'm going to skip it and move it automatically into an outside folder so that it doesn't get accidentally deleted or overridden if the I2\Localization folder is deleted.

    While I made the new release, the alternative is (as you said) to copy the ScriptLocalization.cs file, delete the I2\Localization folder and install the update, then ignore the compile errors and paste the ScriptLocalization back again. That removes the compile errors.

    Again, sorry for the issue and will correct it asap.
    Frank

    PS. The latest version removes all references to OnLevelWasLoaded, so that warning will not longer show after updating.
     
    Korindian likes this.
  25. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    I added the changes to avoid overriding the ScriptLocalization.cs file.
    The new version (2.6.7a1) can be downloaded from the beta folder.

    Hope that helps,
    Frank
     
  26. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Great, thank you.
     
  27. Green-Sauce-Games

    Green-Sauce-Games

    Joined:
    Mar 27, 2014
    Posts:
    71
    I'm facing some problems importing from Google... Sometimes it works, sometimes not... It does not show any error... But nothing is imported. I clicked Replace. Unity 5.4.0f2

    What can I check?
     
  28. Green-Sauce-Games

    Green-Sauce-Games

    Joined:
    Mar 27, 2014
    Posts:
    71
    Strange... on a New Project, it works all the time.... but in an old project it does not works..

    Deleted I2 and reimported it, but the problem remains.

    I'm using 2.6.7a3.
     
  29. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    Its the old project set to WebPlayer or WebGL? The constraints of those platforms may cause the plugin to not be able of contacting google.

    Can you delete your PlayerPrefs, it could be happening that cached information is been used instead of the actual downloaded data. (I already fixed this and haven't had any report of new issues related to this, but its worth checking).

    Can you check that the WebService URL is correctly set and has no white spaces at the end (Lot of times, I have accidentally added white spaces at the end when copy/pasting the URL and it makes the plugin fail accessing the webService).

    Do you have more than 1 LanguageSource? For most games you will only use the I2Languages.prefab without instantiating it in the scene. The example scenes use local language sources, to allow having the used terms even when you already have yours in the I2Languages.prefab. But for most cases, you should stick with the Global I2Languages.prefab as the plugin will be able to get the information from there more accurately.

    If you are using more than 1 LanguageSource or have languageSources in your scene, please, check that they all have the WebService URL set.

    Hope that helps, and please let me know if any of those fixed your issue so that I could add more checks to the plugin and avoid these situations in the future.

    Thanks,
    Frank
     
  30. Green-Jungle

    Green-Jungle

    Joined:
    Jun 10, 2014
    Posts:
    79
    Hi @Inter-Illusion I wanna custom parameter but I can't find ILocalizationParamsManager interface in project.Please help me.
     
  31. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    ILocalizationParamsManager is at the top of Assets\I2\Localization\Scripts\LocalizationParamsManager.cs

    Remember that in your scripts you should add "using I2.Loc;" given that all I2 Localization classes are inside that namespace.

    Also, you could inherit directly from RegisterGlobalParameters class which already implements the OnEnable/OnDisable logic :)
    e.g.
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using I2.Loc;
    5.  
    6. public class MyGlobalParameters : RegisterGlobalParameters
    7. {
    8.      // Find the value of Parameters or return null if not found
    9.      public override string GetParameterValue( string ParamName )
    10.      {
    11.            if (ParamName == "WINNER")
    12.                return "Frank";
    13.          
    14.            if (ParamName == "NUM PLAYERS")
    15.                return 5.ToString();
    16.  
    17.            return null; // not found is defined null, not ""
    18.      }
    19. }
    20.  
     
  32. Green-Jungle

    Green-Jungle

    Joined:
    Jun 10, 2014
    Posts:
    79
    Hi @Inter-Illusion I do as you said But I can't find RegisterGlobalParameters class,I can't implement ILocalizationParamsManager or other anything.I don't see the parameters show as in document of project.
     
  33. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi
    Parameters were introduced in version 2.6.7.
    If you can't find the file Assets\I2\Localization\Scripts\RegisterGlobalParameters.cs
    you need to update the latest version in the AssetStore (2.6.7f6) or in the beta folder (2.6.8b3)

    If after updating you can't still find it. Then, it could be an issue with the Unity Package Importer. Normally, you can fix that by deleting the folder Assets\I2\Localization and re-installing the plugin.
     
    Green-Jungle likes this.
  34. Green-Jungle

    Green-Jungle

    Joined:
    Jun 10, 2014
    Posts:
    79
    Thanks @Inter-Illusion .I have more a question.In my game have a Label NGUI use to show all name level base on each Level(For ex:Level 1 this Label show "Text 1",also with this label at level 2 will show "Text 2".)
    If I have 200 level and then I should create 200 key and with value Text 1,Text 2....Text 200?
    How can I use unique key to show all text for each different level?
    How can I change key in Term Label because each level(only use unique label) I wanna load different key to show different value in code.
    I have attach file which I created in game.
    I don't know which method to Set Term for Label.Please give me a solutions.Thank you so much.:)
     

    Attached Files:

  35. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    If you a script that changed the text of the Label to the name of the level, then instead of changing the text, you should call Localize.SetTerm with the term you use to define the level's name.

    instead of
    Code (csharp):
    1.  
    2. label.text = "Level " + levelNum;
    3.  
    you do:
    Code (csharp):
    1.  
    2. label.GetComponent<I2.Loc.Localize>.SetTerm("NameLevel" + levelNum);
    3.  
    Calling SetTerm will automatically find the translation of the term (e.g. "NameLevel2") into the current language and will modify the Label's text.

    Hope that helps,
    Frank
     
  36. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    BTW, also, if your levels don't have unique names, and instead are like "Level 3", "Level 4", etc. Then you could use parameters:

    Term: LevelName
    English "Level {[CURRENT_LEVEL]}"

    Then, in the script you just modify the CURRENT_LEVEL and it will automatically update the LevelName. That way you don't have to create 200 Terms.
     
  37. Green-Jungle

    Green-Jungle

    Joined:
    Jun 10, 2014
    Posts:
    79
  38. Green-Sauce-Games

    Green-Sauce-Games

    Joined:
    Mar 27, 2014
    Posts:
    71
    I'm trying to build my game for Tizen, but the build failed with the following error.

    Code (csharp):
    1.  
    2. ArgumentException: Assets\Plugins\Android\I2Localization is a directory
    3. System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:109)
    4. UnityEditor.FileUtil.UnityFileCopy (System.String from, System.String to, Boolean overwrite) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:207)
    5. UnityEditor.FileUtil.UnityFileCopy (System.String from, System.String to) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:239)
    6. UnityEditor.Tizen.PostProcessTizenPlayer.PostProcess (BuildTarget target, System.String stagingAreaDataUpperCase, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options) (at /Users/builduser/buildslave/unity/build/PlatformDependent/TizenPlayer/Extensions/Managed/BuildPostProcess.cs:154)
    7. UnityEditor.Tizen.TizenBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/TizenPlayer/Extensions/Managed/ExtensionModule.cs:48)
    8. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:176)
    9. UnityEditor.HostView:OnGUI()
    10.  
    11.  
    Is there anything I can try?
     
  39. Green-Jungle

    Green-Jungle

    Joined:
    Jun 10, 2014
    Posts:
    79
    HI @Inter-Illusion .I wanna ask you about Auto Update Frequency in Google Live.I wanna custom update
    as in document use: I2.Loc.LocalizationManager.Sources[0].Import_Google(true);
    But It's doesn't work.I set up Auto Update Frequency is NEVER and then I have a button and each time click in it I wanna update data from spreadsheet.Thanks.
     
  40. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Delete the folder Assets\Plugins\Android\I2Localization
    That folder is for making the normal android stores know your project has been localized to several languages. But from what I'm seeing Tizen uses a different format.
    I will investigate this a bit more and add a solution, but in the meantime, just delete that folder and follow the localization steps in the tizen developer web. (that's just for making the stores know your app is localized, so a text is displayed showing that)

    Sorry for this issue, Import_Google normally is tied to the auto-update.
    I'm going to add a fix to the beta today for Import_Google not executing if Auto-Update is set to NEVER.

    You could make it work by opening the file Assets\I2\Localization\Scripts\Google\LanguageSource_Import_Google.cs

    and modifying the start of the function Import_Google (at line 85)
    from:
    Code (csharp):
    1.  
    2.         public void Import_Google( bool ForceUpdate = false)
    3.         {
    4.             if (GoogleUpdateFrequency==eGoogleUpdateFrequency.Never)
    5.                 return;
    6.  
    to:
    Code (csharp):
    1.  
    2.         public void Import_Google( bool ForceUpdate = false)
    3.         {
    4.             if (!ForceUpdate && GoogleUpdateFrequency==eGoogleUpdateFrequency.Never)
    5.                 return;
    6.  
    Hope that helps,
    Frank
     
    Wadjey likes this.
  41. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    BTW 2.6.8b4 is now in the beta folder with all those fixes and a few more improvements :)
     
    Malbers likes this.
  42. UnityDev291

    UnityDev291

    Joined:
    Jul 21, 2014
    Posts:
    9
    Hi, is there a script call to get a reference to the font used for a specific language?
     
    Last edited: Sep 22, 2016
  43. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Fonts and other assets can be stored in several ways:
    1- As a reference in the Localize component, then the translation holds the name of that reference (normally, this is used when the Font is not in a Resources folder.
    2- As the name of the file (this is used when the font is in the Resources folder)
    3- As a reference in the ResourceManager gameObject (when the font is attached to the I2Languages.prefab and not in the Resources folder.

    If you can access the Localize component that has the font term, then you can call the following function and it will automatically handle all 3 cases as well as use inferred terms if the secondary term is not set:

    Code (csharp):
    1.  
    2. Font GetLocalizedFont()
    3. {
    4.       var loc = GetComponent<I2.Loc.Localize>();
    5.  
    6.       string primaryTerm, secondaryTerm;
    7.       loc.GetFinalTerms( out primaryTerm, out secondaryTerm ); // get the term or find the term if they are inferred
    8.  
    9.       // get the font using the secondary term, or tags in the primary term (e.g. "[ARIAL]term")
    10.       return loc.GetSecondaryTranslatedObj<Font>( ref primaryTerm, ref secondaryTerm );
    11. }
    12.  
    That's the proper way of getting the font, but if you already know that the font is in the resources folder, assetBundle or referenced in the resources manager and not in the Localize component, then it can be as simple as:

    Code (csharp):
    1.  
    2. Font font = LocalizationManager.FindAsset("Arial") as Font;
    3.  
    Hope that helps,
    Frank
     
  44. Green-Jungle

    Green-Jungle

    Joined:
    Jun 10, 2014
    Posts:
    79
    Hi @Inter-Illusion I'm having a problems.I have many data (many key and value) on spread sheet google drive.
    Now I have about 600 key Term.When I use GetComponent<I2.Loc.Localize>.SetTerm in button and then Dialog show very Lag.If I change 2 times of SetTerm when click in button to show Dialog then Dialog don't smooth.I don't know why.Suggestion for me.Thanks.
     
    Last edited: Sep 28, 2016
  45. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Just installed 5.4.1p3 and am getting a couple of logs in the console about Unsupported encoding: 'utf-8, application/xml' UnityEngine.WWW:get_text() in I2.I2AboutHelper:CheckConnectionResult() (at Assets/I2/Common/Editor/I2AboutWindow.cs:88).

    Just thought you should know!
     
    Wadjey likes this.
  46. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    I have been testing in 5.4.0 and was not getting any issue, let me install 5.4.1p3 and see why is showing for you.
    I will let you know.

    600 Terms is not an issue at all. Several of the developers using the plugin have over 200,000 terms (crazy, right!!) I even had to optimize the terms list for those cases!

    The SetTerm function is actually pretty light-weight, it just gets the value from a dictionary, parse it a bit (parameters, RTL, etc) and output the result using the target you selected.

    So, its interesting to know why is showing slow for you.
    There are several possibilities:
    1- You are changing the Font for that element based on the language (SecondaryTerm). If you are using dynamic fonts and unity has to request new characters, that could lead to a lag when unity recreates the texture.
    2- Can you double check that you are not calling SetTerm every frame? Even if its a light-weight call, if called every frame or several times a frame, it could lead to issues.
    3- Are you only changing the Term or are you also changing the language. When changing a term, only that Localize component is updated, When changing the language, ALL enabled localize components are updated.

    When you say that the dialog is not smooth. Are you saying that it DELAYS a moment to open or that after it shows, its animations and the overall framerate drops for a few seconds?
     
    Last edited: Sep 29, 2016
  47. Green-Jungle

    Green-Jungle

    Joined:
    Jun 10, 2014
    Posts:
    79
    Hi @Inter-Illusion
    It's hard to describe it for you.I have a dialog and in it have a text title "Shop" which will setTerm in code c#.
    Dialog will scale from 0 to 1 when click and Button.and when click button I call:
    labelShop.GetComponent<I2.Loc.Localize>.SetTerm("Shop");
    and Then Dialog will scale to 1 and setTerm for Title .But when dialog scale from 0 to 1 it was Lag .
     
  48. mruce

    mruce

    Joined:
    Jul 23, 2012
    Posts:
    28
    Hi there,
    Is it possible to have multiple texts for a singe term? I'd like to pick one of texts randomly - for example term "Success" would have texts like "Awesome", "Great" and so on. I know I can create multiple terms for them but it's far from perfect solution.
     
  49. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Terms can't have sub-terms assigned. By concept, a term contains the translations of something into several languages. It doesn't handle synonyms or similar.
    One thing some developers have used for the case you are showing is to create terms like:
    GAME_WON_1, GAME_WON_2, GAME_WON3, etc
    Each of those terms has a message for when the game finishes. Those messages don't even have to match their translation as far as there is a sentence in each language for when the game finishes.
    Then, it's as simple as .SetTerm( "GAME_WON_" + Random.Range(0, 4))
     
  50. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi,
    There is any update about the Unsupported encoding: 'utf-8, application/xml' ?