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

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Any news on this ?

    I don't know how to localize the NSUserTrackingUsageDescription value in the ATT native dialog with i2localization.
     
  2. nindim

    nindim

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

    Just circling back on these outstanding bugs in the hope you've had some time to fix them?

    I'd also like to bring your attention to the two changes I have listed in my previous post as well.

    Thanks a lot!


     
  3. LBCstudios

    LBCstudios

    Joined:
    Mar 8, 2017
    Posts:
    8
    Hey guys, I have 7 languages set up and can switch between them in-game using a toggle I made and it works fine. When I test first load (to see if the language automatically loads for a specific device language) a few languages fail to load. Spanish, German and Italian always fail to load.

    I remove data and uninstall the game. Change device language to Spanish (for example), and load the game and it just stays on English. All my other languages work as expected, but these 3 in particular fail to load every time. The player has to manually choose it in the options.

    EDIT: Is it possible this is caused by not initializing I2 in my loading scene? We use a loading scene and then the player is moved to the main scene where I2 is initialized and in use. Could this be the issue?
     
    Last edited: Nov 1, 2022
  4. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    By any chance, do you have a LanguageSource in your scene? Or are you storing your translations in the I2Languages.asset in the resource folder?

    The plugin uses the languages defined in the I2Languages.asset to decide the startup language.
    So, if your languages are in the scene, the plugin may not be detecting them if they are not the first loaded scene.

    To solve this problem, just open the I2Languages.asset and create all your languages there. Its fine to leave them empty (no translations).

    That way on startup, the plugin will see that there are languages available and pick the most suitable one. Then once your scene is loaded, it will already be using the correct language.
     
  5. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    I'm sorry for those delayed issues with RTL.

    I have partially implemented the changes for most of them, but haven't been able to work on them lately. In truth, I have been procrastinating a bit on working on them as they touch lots of things that I have been wanting to refactor for a long time now.

    Fortunately, I will have a bit of extra free time in the next weeks, so I will do a big push to fix them.
    Sorry about that the delay!
     
  6. LBCstudios

    LBCstudios

    Joined:
    Mar 8, 2017
    Posts:
    8
    I am using the I2Languages.Asset in the Resources folder. I have set all my languages in it, all my terms etc. I don't see any way to add this to the scene so can you clarify what you mean by that?
     
  7. YUTA-LEQUIOS

    YUTA-LEQUIOS

    Joined:
    Apr 8, 2016
    Posts:
    11
    @Inter-Illusion

    I have not received the following response.
    Are there any plans to support this?

     
  8. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello I have a question.
    I wonder if I there is an option to disable Langauge versions, but still show it when changing language, for example as greyed or (not available) We are going to release demo of the game with few lagnauges but show people that other languages are not available in demo but will be in full release. Is that possible? (I know that there is option to disable language and that's a great feature, but what with disabling and still showing in options as unavailable?
     
  9. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    Just wanted to let you know that you have mistakes in your documentation:
     
    Inter-Illusion likes this.
  10. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    Also wanted to share a patch for I2Localization version 2.8.13 f2 (cannot guarantee that it can be applied to other versions).

    The attached archive contains a patch file which can be applied to a git unity project with I2Localization (paths in the patch file may need to be adjusted).

    The patch adds a filter for "Untranslated" terms. Terms are considered untranslated if there is no letter present in any of the supported languages for the given term.
    upload_2022-11-7_13-49-26.png

    As we usually generate localization entries from code, this is super helpful for us. Maybe also for you :)
     

    Attached Files:

  11. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    I have another question about protecting whole transcript to be extracted from build, for example when creating game demo, we don't want people to extract all translations that are not used there. The loalisations files are in any way protected in build before being extracted?
     
  12. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Hi.
    I was using past version (I don't remember but 1 year earlier version) and just before I updated to new version.

    And immediately script error occurs. Here are.
    Please let me know the resolution asap.

    --------
    Assets\I2\Localization\Scripts\Editor\EditorTools.cs(42,17): error CS0149: Method name expected
    Assets\I2\Localization\Scripts\Editor\Localization\LocalizationEditor_Languages.cs(155,43): error CS1660: Cannot convert lambda expression to type 'Action' because it is not a delegate type
    Assets\I2\Localization\Scripts\Editor\Localization\LocalizationEditor_Spreadsheet_Google.cs(320,38): error CS1660: Cannot convert lambda expression to type 'Action' because it is not a delegate type
    Assets\I2\Localization\Scripts\Editor\Localization\LocalizationEditor_Spreadsheet_Google.cs(335,38): error CS1660: Cannot convert lambda expression to type 'Action' because it is not a delegate type
    Assets\I2\Localization\Scripts\Editor\Localization\LocalizationEditor_Terms_Description.cs(247,42): error CS1660: Cannot convert lambda expression to type 'Action' because it is not a delegate type
    Assets\I2\Localization\Scripts\Editor\Localization\LocalizationEditor_Terms_Description.cs(456,50): error CS1660: Cannot convert lambda expression to type 'Action' because it is not a delegate type
    -------

    And here is Player.log error immediately PC windows (for Steam) build run locally on my desktop. (i2 localization older version, not updated to newest)

    ----------
    Error saving file 'C:/Users/Lee/AppData/Local/Temp/asdf/mygame/LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc'
    System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\Users\Lee\AppData\Local\Temp\asdf/mygame\LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc"
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at I2.Loc.I2BasePersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00025] in N:\versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:201
    at I2.Loc.PersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00020] in N:\versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:56
    at I2.Loc.LanguageSourceData.SaveLanguages (System.Boolean unloadAll, I2.Loc.PersistentStorage+eFileType fileLocation) [0x00050] in N:\versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:307
    at I2.Loc.LanguageSourceData.UpdateDictionary (System.Boolean force) [0x000f1] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:35
    at I2.Loc.LocalizationManager.AddSource (I2.Loc.LanguageSourceData Source) [0x000c5] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:104
    at I2.Loc.LocalizationManager.RegisterSceneSources () [0x00061] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:46
    at I2.Loc.LocalizationManager.UpdateSources () [0x0000d] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:26
    at I2.Loc.LocalizationManager.InitializeIfNeeded () [0x00028] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager.cs:32
    at I2.Loc.LocalizationManager.get_CurrentLanguage () [0x00001] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Language.cs:17
    at I2.Loc.Localize.OnLocalize (System.Boolean Force) [0x00037] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:161
    at I2.Loc.Localize.Awake () [0x0001b] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:116
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    I2.Loc.I2BasePersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:207)
    I2.Loc.PersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:56)
    I2.Loc.LanguageSourceData:SaveLanguages(Boolean, eFileType) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:307)
    I2.Loc.LanguageSourceData:UpdateDictionary(Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:35)
    I2.Loc.LocalizationManager:AddSource(LanguageSourceData) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:104)
    I2.Loc.LocalizationManager:RegisterSceneSources() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:46)
    I2.Loc.LocalizationManager:UpdateSources() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:26)
    I2.Loc.LocalizationManager:InitializeIfNeeded() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager.cs:32)
    I2.Loc.LocalizationManager:get_CurrentLanguage() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Language.cs:17)
    I2.Loc.Localize:OnLocalize(Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:161)
    I2.Loc.Localize:Awake() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:116)
    Error saving file 'C:/Users/Lee/AppData/Local/Temp/asdf/mygame/LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc'
    System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\Users\Lee\AppData\Local\Temp\asdf/mygame\LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc"
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at I2.Loc.I2BasePersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00025] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:201
    at I2.Loc.PersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00020] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:56
    at I2.Loc.LanguageSourceData.SaveLanguages (System.Boolean unloadAll, I2.Loc.PersistentStorage+eFileType fileLocation) [0x00050] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:307
    at I2.Loc.LanguageSourceData.UpdateDictionary (System.Boolean force) [0x000f1] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:35
    at I2.Loc.LanguageSourceData.Awake () [0x0000a] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData.cs:108
    at I2.Loc.LanguageSource.Awake () [0x00013] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSource.cs:100
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    I2.Loc.I2BasePersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:207)
    I2.Loc.PersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:56)
    I2.Loc.LanguageSourceData:SaveLanguages(Boolean, eFileType) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:307)
    I2.Loc.LanguageSourceData:UpdateDictionary(Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:35)
    I2.Loc.LanguageSourceData:Awake() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData.cs:108)
    I2.Loc.LanguageSource:Awake() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSource.cs:100)
     
  13. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    What version of unity are you using?
    Is your project set to .Net Framework or .Net Core 2.1?
     
  14. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    @Inter-Illusion sorry, Action error was because I had my custom Action class. I changed that name and that error gone.

    But about this error,
    anything got in your mind for reason or solution?

    -------
    And here is Player.log error immediately PC windows (for Steam) build run locally on my desktop. (i2 localization older version, not updated to newest)
    Error saving file 'C:/Users/Lee/AppData/Local/Temp/asdf/mygame/LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc'
    System.IO.DirectoryNotFoundException: Could not find a part of the path
    --------

    My Project settings are [IL2CPP] for Scripting Backend and [.NET 4.x] for Api Compatibility Level.
     
  15. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Newest I2 localization version updated, and this is updated version's error. For find exact script line number.

    After run game's PC build's .exe file from Windows 10 64bit, it immediately crashes and left this error at Player.log file.

    --------
    Error saving file 'C:/Users/Lee/AppData/Local/Temp/my/myGame/LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc'
    System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\Users\Lee\AppData\Local\Temp\my/myGame\LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc"
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at I2.Loc.I2BasePersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00025] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:204
    at I2.Loc.PersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00020] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:59
    at I2.Loc.LanguageSourceData.SaveLanguages (System.Boolean unloadAll, I2.Loc.PersistentStorage+eFileType fileLocation) [0x00050] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:304
    at I2.Loc.LanguageSourceData.UpdateDictionary (System.Boolean force) [0x000f1] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:34
    at I2.Loc.LocalizationManager.AddSource (I2.Loc.LanguageSourceData Source) [0x000c5] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:103
    at I2.Loc.LocalizationManager.RegisterSceneSources () [0x00061] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:46
    at I2.Loc.LocalizationManager.UpdateSources () [0x0000d] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:26
    at I2.Loc.LocalizationManager.InitializeIfNeeded () [0x00028] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager.cs:31
    at I2.Loc.LocalizationManager.get_CurrentLanguage () [0x00001] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Language.cs:16
    at I2.Loc.Localize.OnLocalize (System.Boolean Force) [0x00037] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:165
    at I2.Loc.Localize.Awake () [0x0001b] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:120
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    I2.Loc.I2BasePersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:210)
    I2.Loc.PersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:59)
    I2.Loc.LanguageSourceData:SaveLanguages(Boolean, eFileType) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:304)
    I2.Loc.LanguageSourceData:UpdateDictionary(Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:34)
    I2.Loc.LocalizationManager:AddSource(LanguageSourceData) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:103)
    I2.Loc.LocalizationManager:RegisterSceneSources() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:46)
    I2.Loc.LocalizationManager:UpdateSources() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs:26)
    I2.Loc.LocalizationManager:InitializeIfNeeded() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager.cs:31)
    I2.Loc.LocalizationManager:get_CurrentLanguage() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Manager\LocalizationManager_Language.cs:16)
    I2.Loc.Localize:OnLocalize(Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:165)
    I2.Loc.Localize:Awake() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Localize.cs:120)
    Error saving file 'C:/Users/Lee/AppData/Local/Temp/my/myGame/LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc'
    System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\Users\Lee\AppData\Local\Temp\my/myGame\LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc"
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    at I2.Loc.I2BasePersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00025] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:204
    at I2.Loc.PersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00020] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:59
    at I2.Loc.LanguageSourceData.SaveLanguages (System.Boolean unloadAll, I2.Loc.PersistentStorage+eFileType fileLocation) [0x00050] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:304
    at I2.Loc.LanguageSourceData.UpdateDictionary (System.Boolean force) [0x000f1] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:34
    at I2.Loc.LanguageSourceData.Awake () [0x0000a] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData.cs:108
    at I2.Loc.LanguageSource.Awake () [0x00013] in N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSource.cs:98
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    I2.Loc.I2BasePersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:210)
    I2.Loc.PersistentStorage:SaveFile(eFileType, String, String, Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\Configurables\PersistentStorage.cs:59)
    I2.Loc.LanguageSourceData:SaveLanguages(Boolean, eFileType) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Languages.cs:304)
    I2.Loc.LanguageSourceData:UpdateDictionary(Boolean) (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Terms.cs:34)
    I2.Loc.LanguageSourceData:Awake() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData.cs:108)
    I2.Loc.LanguageSource:Awake() (at N:\GOD-versionSTEAM\Assets\I2\Localization\Scripts\LanguageSource\LanguageSource.cs:98)
     
    Last edited: Nov 20, 2022
  16. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    strange thing is, above error says there is no file path, but when the game run, your script seems make file at that location. Then why it says there is no file path?

    Here is attached image.
    i2-local-error.JPG
     
  17. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
  18. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Hello? You gave up support this asset? Why u don't answer?
     
  19. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi,
    By default, the plugin stores a unity .asset file, which are saved as binary on the build, but still people could decompress that file from the build and extract all texts from there if they wanted.

    When downloading translations from the google spreadsheets, the translations are encrypted, but they are not stored in that encrypted way once in the client.

    If you game requires that the localizations be more protected, then you could add a build step to export the languages to csv files, encrypt those files, and then on the game startup load the files into the I2Languages source. That is not implemented by default, but it works similar to the example in the documentation that shows how to read a csv file and import it on startup, just add a decrypt step in the middle based on the level of security you need.

    Check the ReadCSVFrom_Resources() function for reference:
    http://inter-illusion.com/assets/I2LocalizationManual/ImportingaCSVfile.html
     
  20. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    That's a very weird behaviour, it looks like the filename its trying to access has been clamped:
    'C:/Users/Lee/AppData/Local/Temp/my/myGame/LangSource_StartScene_MainLanguageSetting1_iWAgSdBI3f8m-DbSy888Vo0nr9pI12dMOMtKN1V-dU_ .loc'
    but all filenames in the directory end with the name of the language.

    By any chance in your language source is there a language with an empty (or space ' ') name?
    That could be why its failing, as its trying to load a language named ' ', but when combining the path later on, the space at the end its trimmed.

    If thats not the case, it could be a bug related to the LanguageSource been stored inside your StartScene. If you move the translations to the I2Languages.asset in the resources folder, does that fixes the issue? If thats the problem I'm guessing a there could be some max size on the filename string, I'm looking to see if I can repro that with a nested languageSource inside an scene.
     
  21. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Thx for reply.

    That's strange. If it's because of something being cut off after the filename, how can I fix the source code?
    Anyway, I didn't touch anything in the asset source file.

    And I didn't invent the language names. I just selected the languages from the asset's drop-down menu provided.

    How to do this? You mean [move I2Languages.asset to unity project's Asset/Resources] folder manually? Where is I2Languages.asset?
     
  22. mike6502

    mike6502

    Joined:
    Oct 5, 2016
    Posts:
    49
    Apologies if this was previously asked. I need to localize push notification text for iOS and Android, for notifications sent by Firebase Cloud Messaging. FCM notifications can be sent with a string ID, which for iOS, is contained in Resources for each language called Localizable.strings, and for Android something similar called strings.xml. (ref: https://github.com/CrossGeeks/Fireb...er/docs/LocalizedFirebasePushNotifications.md)

    These string tables aren't mentioned in the I2Loc documentation. Am I correct in assuming that I2Loc does not support these string tables that are used for push notifications? And if not, is there a reference somewhere for how I could automate the creation of these resources?
     
  23. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Why change language does not work at windows 10 standalone build?

    I use this code for change language.

    Code (CSharp):
    1. public void SetLanguage()
    2.     {
    3.         UserScript.Instance.CurLanguage = (LanguageList)tempLanguage;
    4.  
    5.         string _Language = UserScript.Instance.CurLanguage.ToString();
    6.         if (_Language == "Portugal")
    7.             _Language = "Portuguese (Brazil)";
    8.         if (I2.Loc.LocalizationManager.HasLanguage(_Language))
    9.         {
    10.             I2.Loc.LocalizationManager.CurrentLanguage = _Language;
    11.         }
    12.         LanguageUpdate();
    13.     }
    I2.Loc.LocalizationManager.CurrentLanguage = _Language;

    Why this not work at standalone? Works well at unity editor after build addressable asset.

    And I tried to change
    _Language = "Portuguese (Brazil)"; to _Language = "Portuguese";
    and there is no empty space language name,

    but not works, and above my replies 2 errors (error saving file....) still occurs at window standalone build.
     
    Last edited: Dec 9, 2022
  24. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    I don't know why but always after click [import - merge], empty name's language appears.
    I tried to build assets and standalone after delete this empty language,
    but [error saving files..] occurs and change language does not work.

    i2lang-empty.JPG
     
  25. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Anyway, I might solved. So the reason was empty language name. Your guess is correct. After deleting empty language, no error at standalone build and language changing works.
     
  26. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    We've been using I2 for a long time to export to a Google Spreadsheet. Recently, we noticed that whenever we added new entries, the cells are sorted alphabetically. We haven't changed anything on our end. In the past, new entries were always added in the bottom of the sheet, which is quite convenient.

    Is there a way to get this old behaviour back?
     
  27. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    That is weird, sorting has been there for a while now. Did you recently updated from an older version?

    You can easily disable the sorting by commenting the line 174 of LanguageSourceData_Export_CSV.cs
    Code (csharp):
    1.  
    2. // mTerms.Sort((a, b) => string.CompareOrdinal(a.Term, b.Term));
    3.  
    I will add an option to disable that from the interface as well
     
  28. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    I'm targeting Xbox Series X (UNITY_GAMECORE) and when doing so the only target for I2 Localize is Prefab. Breaking all my labels localization. If I switch to Android target for instance it works and TMProUGUI is set as target.

    Any idea what causes this? @Inter-Illusion
     
  29. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Thank you. We are using an older version of the plug-in, yes. Sounds good with an interface toggle button as well.
     
  30. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323
  31. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323
    Creating builds is also with a problem on version 2.8.21.

    Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Export_Google.cs(54,118): error CS0103: The name 'Spreadsheet_SortRows' does not exist in the current context
     
  32. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    I got this error as well, put it in a #if UNITY_EDITOR define to solve it. Some miss from the developer in the latest update.

     
    wagenheimer likes this.
  33. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    I found the issue to my problem, TextMeshPro wasn't defined when switching over to GAMECORE (xbox series x). Added the define and everything started working as expected.
     
    littledwarf and Inter-Illusion like this.
  34. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Thanks for reporting this issue, this is now fixed in the latest version (2.8.21 f2)
     
  35. lespinola

    lespinola

    Joined:
    Oct 1, 2016
    Posts:
    8
    Hi @Inter-Illusion, I need some help.

    I need add all keys to my array list, something like foreach , {add key to array}.
    Can you help about it ?

    Thanks
     
  36. lespinola

    lespinola

    Joined:
    Oct 1, 2016
    Posts:
    8
    The code below works well
    public List <string> terms=new List<string>();

    // Start is called before the first frame update
    void Start()
    {
    terms = LocalizationManager.GetTermsList();
    }

    but now I need to filter the result like "key\xyz" , can youe help me ?

    Thanks
     
  37. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Hi
    If you want to filter the list, you could use linq:
    add at the top:
    Code (csharp):
    1.  
    2. using System.Linq;
    3.  
    4. public List <string> terms=new List<string>();
    5.  
    6. // Start is called before the first frame update
    7. void Start()
    8. {
    9.       string filter = "Tutorial\\Options";
    10.       terms = LocalizationManager.GetTermsList()
    11.                                                     .Where(s => s.Contains(filter))
    12.                                                     .ToList();
    13. }
    14.  
    or if you want to add more filtering you could use the non-linq:
    Code (csharp):
    1.  
    2. void Start()
    3. {
    4.       string filter = "Tutorial\\Options";
    5.       foreach (string term_name in LocalizationManager.GetTermsList())
    6.      {
    7.           if (term_name.Contains(filter))
    8.                terms.Add(term_name);
    9.      }
    10. }
    11.  
    Hope that helps,
    Frank
     
    lespinola likes this.
  38. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Getting "A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details." in my project since adding L2?
     
  39. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    I2 Localization doesn't use Native Collections, Jobs or Burst.

    Are you getting any other errors aside that one, maybe there is another issue at the beginning of the log, and after it fails, its causing that error to show?
    Does any of the terms is set to Prefab? If you have any prefab that uses NativeCollections, maybe they are not been disposed given that the Localization still holds a reference to them?
     
  40. dev_dash

    dev_dash

    Joined:
    Jul 26, 2020
    Posts:
    15
    I have run google script and deployed. Then this is showed up.
    What is the password section? what is that supposed to do? It's not hide passwords by asteriks.
     

    Attached Files:

  41. dev_dash

    dev_dash

    Joined:
    Jul 26, 2020
    Posts:
    15
    I have set font per language but when I click l2 localize - term - english korean text section, only the text changes not the font. What is the problem?
     

    Attached Files:

    • main.png
      main.png
      File size:
      30.6 KB
      Views:
      81
    • sec.png
      sec.png
      File size:
      29.1 KB
      Views:
      80
  42. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    When you deploy the WebService, at the top of the script, were it shows the steps you need to follow, there is a quick description of what the password is:
    upload_2023-1-11_11-31-8.png

    Basically, its an EXTRA layer of protection.
    The webservice already constraints that apps only have access to Spreadsheets in your google drive, that start with the name "I2Loc".
    When changing the password variable in the WebService, you can also force the plugin to only accept connections if the password match.

    In the editor, the password is not hidden with asterisk, because anyone that uses your editor can edit/modify/export the spreadsheets anyways, so there is no point in further hiding this.
     
    dev_dash likes this.
  43. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    Are you following the steps from here?
    http://inter-illusion.com/assets/I2LocalizationManual/HowtoChangeFontperLanguage.html

    Essentially, you need to create a term for the font (e.g. "ARIAL"),
    then set font asset you want to use for each language.
    finally, in the Localize component, set that term as the Secondary Term.

    If you name the Term with the same name as Font you normally use in the editor, the Secondary Term will be filled automatically and you don't need to set it for every Localize component.
    For example, if in your editor you have all your texts with the Arial font, and you create a term named Arial, that term will be automatically used as the Secondary Term when you add a Localize component to a text using that font.

    Hope that helps,
     
    dev_dash likes this.
  44. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    I'm pretty sure the error I was getting "A Native Collection has not been disposed, resulting in a memory leak....." happens before I click play. So far Ive only used I2 in gui objects that are on screen the whole time in the scene and never had the error before importing and setting up I2. I do get "errors" at the top of the I2 inspector sometimes when updating some of the localisations, especially if i use the translate all button. Translating each language one by one seems to avoid that. Not sure if the two errors are related.
     
  45. AmitChBB

    AmitChBB

    Joined:
    Feb 16, 2021
    Posts:
    37
    Howdy Mr. Inter-Illusion, hope you're doing well :)

    Small question regarding I2 - I know you can use it to connect your Unity game's localization to a Google Sheet for updating localization after build. However, this is not ideal for large-scale games because Google caps communication with a sheet to ~300 times a minute.
    Is it possible to connect I2 to a backend developed by me? For example, I'll host a CSV file and tell I2 to read localization from it?
     
  46. Inter-Illusion

    Inter-Illusion

    Joined:
    Jan 5, 2014
    Posts:
    598
    AmitChBB likes this.
  47. Dust999Games

    Dust999Games

    Joined:
    Jan 10, 2014
    Posts:
    7
    Hi Frank.

    I want to ask you about additional functionality for an iOS build post-processing.

    Custom strings. Like we have a plus button in the section with an app name. On button press, we add the new string, for the plist file. It will be a string-field in the editor -> NSUserTrackingUsageDescription and dropdown to select the corresponding term.

    Then in the post-processing file, it goes right after the bundle name.

    Code (CSharp):
    1. CFBundleDisplayName = "APP NAME";
    2. NSUserTrackingUsageDescription = "Term goes here...";
    That would be easier to add all localized strings for native popups on iOS.
     
    Inter-Illusion likes this.
  48. nindim

    nindim

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

    Thanks for the update. I was wondering if you have managed to make any progress on this?

    I have just updated to the latest version and noticed that the "Booting in a RTL language causes Adjust Alignment to Malfunction" issue that I provided a fix for still persists. The fix I found is below. It looks like the line of code has been added before the call to "LocalizeTarget_TextMeshPro_Label.InitAlignment_TMPro" in the latest release which means the fix fails.

    upload_2023-2-2_12-41-10.png

    Here is a link to the previously reported issues for your convenience: https://forum.unity.com/threads/i2-...olution-for-unity.231226/page-20#post-7978737

    Thank you for adding the warning when a term is not found.

    All the best,

    Niall
     
  49. r35

    r35

    Joined:
    Mar 5, 2015
    Posts:
    9
    Hello @Inter-Illusion,
    I've received an issue from one of my customers, that reading CSV file is not working.
    After looking at the log, I found that the temporal name of the language file contains a 'line break' character just before the extension for some reason, making this issue.
    (Can not reproduce on my side, it's not happening in my environment)
    (That CSV has only English and 'English' is the end of the header, that's why?... I guess...)

    Code (CSharp):
    1. Error saving file 'C:/Users/[userName]/AppData/Local/Temp/[studioName]/[gameName]/LangSource_I2Languages1dmddQimTqggCqqVxZUQzF0JX5l4Rj33-hR83t0FdBSk_English
    2. .loc'
    3. System.ArgumentException: Illegal characters in path.
    4.   at System.IO.Path.GetFileName (System.String path) [0x00000] in <00000000000000000000000000000000>:0
    5.   at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00000] in <00000000000000000000000000000000>:0
    6.   at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    7.   at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <00000000000000000000000000000000>:0
    8.   at I2.Loc.I2BasePersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00000] in <00000000000000000000000000000000>:0
    9.   at I2.Loc.PersistentStorage.SaveFile (I2.Loc.PersistentStorage+eFileType fileType, System.String fileName, System.String data, System.Boolean logExceptions) [0x00000] in <00000000000000000000000000000000>:0
    10.   at I2.Loc.LanguageSourceData.SaveLanguages (System.Boolean unloadAll, I2.Loc.PersistentStorage+eFileType fileLocation) [0x00000] in <00000000000000000000000000000000>:0
    11.   at I2.Loc.LanguageSourceData.Import_CSV (System.String Category, System.Collections.Generic.List`1[T] CSV, I2.Loc.eSpreadsheetUpdateMode UpdateMode) [0x00000] in <00000000000000000000000000000000>:0
    12.   at r35_Init.ReadCSVFrom_StreamingFolder () [0x00000] in <00000000000000000000000000000000>:0
    Wonder this issue has fixed or not, Just wanna share this with you
    since the release note on your website is no longer maintained.
    I'm using 2.8.13 f1, FYI
     
  50. dev_dash

    dev_dash

    Joined:
    Jul 26, 2020
    Posts:
    15
    Hi. @Inter-Illusion,

    In Unity editor, Terms tab. How can I copy the key to clipboard or Is there a easy way to get the key string?
    Because currently Im getting the key by clicking "rename" button of the term and It lead to the Tool tab and It's seems like I have to rename for sure. And It's little annoying for the simple task. It'd be very good to have the feature that let me copy the key only in Terms tab not need to move some weired tool. Because The key is the most important and frequently used thing in this asset.
    I need just one "copy the key" button that do this thing. If I am missing something, please let me know. Thanks!
     
    Last edited: Feb 22, 2023