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

[RELEASED] Smart Localization for Unity3D

Discussion in 'Assets and Asset Store' started by NiklasBorglund, Mar 13, 2013.

  1. ingtellect

    ingtellect

    Joined:
    Sep 2, 2013
    Posts:
    4
    Hi, first of all, thanks for awesome plugin! My app worked just fine until I updated Unity 4.6.2 to 4.7.0 for supporting iOS9 today. I also updated smart localization plugin to 2.4. I think it crashes when calling SmartLocalization.LanguageManager.get_Instance ()
    I searched this forum and I changed language codes without locales but didn't work. I build the app with Xcode 7.2 and tested with iPad mini 2 with iOS 9.2.
    Full error log is here.

    Initialize engine version: 4.7.0f1 (9c73fd3cda99)

    XmlException: Referenced character was not allowed in XML. Normalization is True, checkCharacters = True Line 161, position 15.
    at System.Xml.XmlConvert.ToBinHexString (System.Byte[] buffer) [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadCharacterReference () [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadReference (Boolean ignoreEntityReferences) [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
    at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
    at System.Xml.XmlReader.ReadStartElement () [0x00000] in <filename unknown>:0
    at System.Xml.XmlReader.ReadElementContentAsString () [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageParser.ReadData (System.Xml.XmlReader reader, System.Collections.Generic.SortedDictionary`2 loadedLanguageDictionary) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageParser.ReadElements (System.Xml.XmlReader reader, System.Collections.Generic.SortedDictionary`2 loadedLanguageDictionary) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageParser.LoadLanguage (System.String languageDataInResX) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageDataHandler.LoadLanguageDictionary (System.String resxData) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageDataHandler.Load (System.String resxData) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.LoadLanguage (System.String languageData, System.String languageCode) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.ChangeLanguage (System.String languageCode) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.ChangeLanguage (SmartLocalization.SmartCultureInfo cultureInfo) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.Awake () [0x00000] in <filename unknown>:0
    at UnityEngine.GameObject.Internal_AddComponentWithType (System.Type componentType) [0x00000] in <filename unknown>:0
    at UnityEngine.GameObject.AddComponent (System.Type componentType) [0x00000] in <filename unknown>:0
    at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.get_Instance () [0x00000] in <filename unknown>:0
    at ScreenFader.checkLanguage () [0x00000] in <filename unknown>:0
    at ScreenFader.Awake () [0x00000] in <filename unknown>:0
    UnityEngine.GameObject:Internal_AddComponentWithType(Type)
    UnityEngine.GameObject:AddComponent(Type)
    UnityEngine.GameObject:AddComponent()
    SmartLocalization.LanguageManager:get_Instance()
    ScreenFader:checkLanguage()
    ScreenFader:Awake()
    (Filename: currently not available on il2cpp Line: 4294967295)
    Unhandled Exception: System.Xml.XmlException: Referenced character was not allowed in XML. Normalization is True, checkCharacters = True Line 161, position 15.
    at System.Xml.XmlConvert.ToBinHexString (System.Byte[] buffer) [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadCharacterReference () [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadReference (Boolean ignoreEntityReferences) [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
    at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
    at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
    at System.Xml.XmlReader.ReadStartElement () [0x00000] in <filename unknown>:0
    at System.Xml.XmlReader.ReadElementContentAsString () [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageParser.ReadData (System.Xml.XmlReader reader, System.Collections.Generic.SortedDictionary`2 loadedLanguageDictionary) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageParser.ReadElements (System.Xml.XmlReader reader, System.Collections.Generic.SortedDictionary`2 loadedLanguageDictionary) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageParser.LoadLanguage (System.String languageDataInResX) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageDataHandler.LoadLanguageDictionary (System.String resxData) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageDataHandler.Load (System.String resxData) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.LoadLanguage (System.String languageData, System.String languageCode) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.ChangeLanguage (System.String languageCode) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.ChangeLanguage (SmartLocalization.SmartCultureInfo cultureInfo) [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.Awake () [0x00000] in <filename unknown>:0
    at UnityEngine.GameObject.Internal_AddComponentWithType (System.Type componentType) [0x00000] in <filename unknown>:0
    at UnityEngine.GameObject.AddComponent (System.Type componentType) [0x00000] in <filename unknown>:0
    at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <filename unknown>:0
    at SmartLocalization.LanguageManager.get_Instance () [0x00000] in <filename unknown>:0
    at ScreenFader.checkLanguage () [0x00000] in <filename unknown>:0
    at ScreenFader.Awake () [0x00000] in <filename unknown>:0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogError(Object)
    UnityEngine.UnhandledExceptionHandler:printException(String, Exception)
    UnityEngine.UnhandledExceptionHandler:HandleUnhandledException(Object, UnhandledExceptionEventArgs)
    System.UnhandledExceptionEventHandler:Invoke(Object, UnhandledExceptionEventArgs)
    UnityEngine.GameObject:Internal_AddComponentWithType(Type)
    UnityEngine.GameObject:AddComponent(Type)
    UnityEngine.GameObject:AddComponent()
    SmartLocalization.LanguageManager:get_Instance()
    ScreenFader:checkLanguage()
    ScreenFader:Awake()



    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)

    Any advice would be appreciated. Thanks!
     
  2. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Reading from your logs, it seems like there's an invalid xml character in your language file. What language are you loading at startup?

    And can you load that language in the editor windows?
     
  3. ingtellect

    ingtellect

    Joined:
    Sep 2, 2013
    Posts:
    4
    There were bunch of "&#x8;" characters in the xml files. I couldn't see them in the editors though. Maybe push the backspace key in editor caused that. After remove them and changed chinese language code from zh-CHS to zh-CN, everything works fine. Thanks!
     
  4. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    That's great :) I'll keep an eye out if I see anything weird happening in the Smart Localization plugin that could cause such a thing as well. Thanks.
     
  5. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    346
    Hi, I have a question, is it possible to edit root language in excel or other editors, too?
    I have lot of keys, would be handy to edit in excel!?
     
  6. wkwan

    wkwan

    Joined:
    Sep 14, 2014
    Posts:
    27
    Hi Niklas,

    I'm using the free version and when I import a csv file, all the special characters get replaced with question marks. I can manually fix them but this is a bit annoying. Have you encountered this issue?

    Also, I found a bug with the Chinese languages. I have filled out the languages zh-CHS and zh-CHT. Using my iOS device (on the latest version), if I change the language to Chinese Simplified, LanguageManager.Instance.GetSupportedSystemLanguage() correctly gives my zh-CHS. However, if I change it the system language to Chinese Traditional, I also get zh-CHS when it should be zh-CHT. Finally, If I change the system language to Chinese Traditional (Hong Kong), I get null (I even tried filling out all the other Chinese codes, and I still get null in this case).

    I have found a workaround for the Chinese Traditional (Hong Kong) case, which is checking Application.systemLanguage for ChineseTraditional and then changing the language to zh-CHT if true. However, in the Chinese Traditional Case, Application.systemLanguage gives me just Chinese, which I think is a bug in Unity. Do you have any recommendations on how to solve this?

    I hope this makes sense! Please let me know if I need to clarify anything.
    William
     
  7. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    No, Unfortunately not. I guess you could edit the .resx files themselves - but then you have to make sure that all the keys changed/added/removed are done so in all the supported language files as well.

    Yeah, the only thing the GetSupportedSystemLanguage() does is to try and map the name of the Application.systemLanguage with the english name of the SmartCultureInfo. We'll look into the zh-CHT issue and see if we can find anything - I've added it to our trello page.

    A more foolproof way would be to write a small native plugin that gets the ISO-639 code of your device and you map that with the language to choose in Smart Localization. I haven't done that my self, but I guess you could use the currentLocale property in NSLocale for IOS.

    Hope that helps.
     
  8. rafaellop

    rafaellop

    Joined:
    Feb 4, 2015
    Posts:
    26
  9. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Unfortunately, We haven't found a lot on how to do this from a unity project :/

    I've found this - https://developer.apple.com/library...pp.html#//apple_ref/doc/uid/10000171i-CH5-SW1

    Which indicates that one might set it from xcode manually.

    With that said, If anyone got any suggestions on how to automate it/fix it. Let us know.
     
  10. Lamhac69

    Lamhac69

    Joined:
    Mar 4, 2016
    Posts:
    2
    Hello.

    Is it somehow possible to "extend" the 'database' of SL (Free/Pro)? I would need an "extra" field(s) for 'real' comments/information. In SL (Free) there are just [Key, Comment (value)] in root and 2 more in language files, but no 'room' for extra information. Does Pro have better options to handle more fields or is it too just "basic" fields? And if adds extra values to Excel in Pro, does it "override" them when hits the "Save" button?

    Regards, Harri L.
     
  11. zuric

    zuric

    Joined:
    May 22, 2014
    Posts:
    10
    Hi Lamhac69,

    While the .resx file format Smart Localisation uses supports a comment field for each key this is currently not used. You can always extend the PRO version since it comes with full source but it won’t be a quick fix.
    If you have any ideas on how we can better support this in the future don’t hesitate to write.
     
  12. Lamhac69

    Lamhac69

    Joined:
    Mar 4, 2016
    Posts:
    2

    Hello.

    And thanks for the quick response. The answer did rise a couple thoughts:

    1) "It won’t be a quick fix": Is the source (code) so complex/huge that any plans to get extra fields "anytime soon" with Pro would not be practical? What language is used to write the source: C(++/#), Java, Js, VB, other?

    2) "Better support in the future": Well, maybe that "extra" comments field in Pro would be nice. "Free" version could stay as is for now.

    Regads, Harri L.
     
  13. zuric

    zuric

    Joined:
    May 22, 2014
    Posts:
    10
    With "quick fix" I meant that it would involve adding features in multiple sub systems in the code(GUI, reading, writing, etc). It’s certainly possible but might take longer than a day to accomplish. The code base is not that big though.

    We will add the feature to the list of feature requests. It was not my intention to make it sound like we won’t do it. We just can’t say exactly when.
     
  14. rafaellop

    rafaellop

    Joined:
    Feb 4, 2015
    Posts:
    26
    I do this manually, but you should be able to prepare app presence like you do for the Android platform from your asset. In my case, to have my iOS builds recognized as multilanguage in the Appstore, I create a new xcode project file called InfoPlist of string type. I mark the file as localizable and add one string there:

    CFBundleDisplayName = "game";

    Then in the xcode project properties I add supported languages and select this file. xcode creates new InfoPlist files for each language and I can localized app name by modifying the CFBundleDisplayName inside these files. This is how this looks when doing that manually. Maybe this is some idea for you to make this automated like for Android which works great.
     
  15. eddieparkerami

    eddieparkerami

    Joined:
    May 26, 2013
    Posts:
    6
    Sorry if this was answered somewhere in the last nine pages - love this tool, but my one quirk with it right now is when you try to do localization but the files are still read only (because Perforce or some other tool have them locked). The smart localization window stops displaying and you get the following in the console:

    UnauthorizedAccessException: Access to the path "S:\Dev\Personal\Perforce\depot\Game\Main\Game\Assets\SmartLocalizationWorkspace\AutoGenerated\Resources\AvailableCultures.xml" is denied.
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/FileStream.cs:320)
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
    (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    System.Xml.XmlTextWriter..ctor (System.String filename, System.Text.Encoding encoding)
    SmartLocalization.Editor.SmartCultureInfoEx.Serialize (SmartLocalization.SmartCultureInfoCollection info, System.String fullPath)
    SmartLocalization.Editor.LanguageHandlerEditor.CheckAndSaveAvailableLanguages (SmartLocalization.SmartCultureInfoCollection allCultures)
    SmartLocalization.Editor.SmartLocalizationWindow.InitializeCultureCollections (Boolean reloadAllCultures)
    SmartLocalization.Editor.SmartLocalizationWindow.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
     
  16. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Thanks! :D

    Sorry, We don't have any support for Perforce or similar version control system that locks the files(yet)
    . I've written it down in our feature request page on trello
     
  17. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    "Failed to load language with ISO-639 code: en. Unable to find a corresponding SmartCultureInfo"

    I get this error at startup of my game, but the English default resources load anyway. Does anyone know what this error means? I have "en" in my AvailableCultures.xml and a corresponding Language.en file.

    Thanks.
     
  18. Piflik

    Piflik

    Joined:
    Sep 11, 2011
    Posts:
    291
    I am currently using this plugin in a project of mine, and I am quite happy with it. Onthing that was quite strange though, was that I had to specifically set the LanguageManager to not be destroyed on load. May I ask, why that is not the default behaviour? I usually want a persistent localization...
     
  19. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    That's odd. And it still loads everything as expected eventhough it says that it's an error? Can you give steps to reproduce? And what system os/unity version/ smart localization version are you using?

    Short answer is that it's part of legacy code. We started out without DontDestroyOnLoad and changing the default behavior "mid-version" is not always accepted by everyone. We're trying to be as backward compatible as possible within the 2.X.X versions.

    We might change it for 3.X.X though.
     
  20. Piflik

    Piflik

    Joined:
    Sep 11, 2011
    Posts:
    291
    Ok. I was just confused, especially since the singleton-pattern implies persistence (at least to me), and I didn't find documentation that it relies on a GameObject that is created automatically, if it is not present in the scene, which then overwrites the instance that might have been created and configured earlier.

    I'd suggest at least updating the description of the Instance property, to make this behaviour clear. As it is right now, it is not apparent.
     
  21. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Yeah, you are right. We'll try and add it to the next version - I've added it to our trello page.

    Good point, thanks.
     
  22. cbauman

    cbauman

    Joined:
    Aug 29, 2011
    Posts:
    17
    Is it possible to load a language at runtime so all of the unused languages don't take up memory?
     
  23. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Im not sure I understand what you mean. Smart Localization only loads one language at a time at runtime and assets are loaded when they are requested. Could you clarify?

    Anyway, here's some information about loading/appending/updating language data at runtime: http://www.janetech.co/blog/2015/12...anguage-data-at-runtime-in-smart-localization

    Hope that helps
     
  24. cbauman

    cbauman

    Joined:
    Aug 29, 2011
    Posts:
    17
    My apologies for the lack of clarification. I just downloaded and experimented with this asset yesterday, which I love so far. Your reply answered my personal curiosity. Sorry if I missed that somewhere in the documentation.

    However, I'm working on a large project for a startup and the lead programmer just now clarified the requirements to me. He wants to be able to load "only pieces of a language file" at a time because there are so many strings. For example, if the player starts a quest, he wants to load only the strings associated with a particular quest. Is this possible?


    Also, while I'm at it, do you plan to include Sprite types for use with the uGUI Image component in a future version? For a single sprite it's easy to convert the Texture type using

    Code (CSharp):
    1. imageObject.sprite = Sprite.Create(tex as Texture2D, new Rect(0, 0, tex.width, tex.height), new Vector2(.5f, .5f));
    but a bit more involved if it's a sprite atlas.
     
    Last edited: Mar 31, 2016
  25. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Great, I'll add the lack of docs/information to my notes and we'll try and update it. Thanks.

    Yeah, sprites is something we would like to support. Can't give an exact timeframe when that will happen though. We are working on some refactoring(that will most likely result in SmartLocalization 3.0) of the whole project at the moment that hopefully will make it easier to add support for any type of asset.
     
  26. cbauman

    cbauman

    Joined:
    Aug 29, 2011
    Posts:
    17
    Okay, sounds good. Thanks for the quick replies. I plan to use this asset for my personal project, too. Great job, Niklas.

    And as for my "only loading certain parts of a language file at a time" inquiry, I assume this is not currently possible, right? Does this sound like a worthwhile feature for you to include in a future release? If not, programming-wise, do you think it would be difficult to do?
     
  27. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Actually, I'm working on a feature similar to that. I'll try and add in selective loading when it's done. Unfortunately, we have a quite a bit left on this feature - so I can't say when it will be done.

    Here's a little teaser on how it will probably look :)
    Skärmavbild 2016-04-01 kl. 09.52.45.png

    In regards to doing it yourself. Sure, as I see it you have two options. None of them will be a quick fix though, you'd probably need to design some sort of system around it.

    1) Use the methods in the blog post I sent you to append data to the currently loaded language. Although that could create an inconvenience in working in the editor since everything there is in one single file - and you need them to be split up.

    2) Change the code in the PRO version. (Although changing the code of a plugin might be tricky to keep track of) Since .resx is not supported by unity as a text asset - Smart Localization converts all of them into text files. Here are some classes that could be changed.
    2a) CustomResxImporter.cs - this is the class that converts all language files to text. Here you could do the desired split of the files into multiple text files.
    2b) LanguageDataHandler.cs - this is the class that handles all the runtime data of a specific language. In the internal method "GetLocalizedObject()" you can check if the key exist in the dictionary. If it doesn't - you can load one of your split up text files with the containing key.

    Beware that we can't guarantee that things will change in future versions of the plugin that makes option 2 not viable any longer.

    Hope that helps
     
  28. cbauman

    cbauman

    Joined:
    Aug 29, 2011
    Posts:
    17
    Helps a lot. Nice teaser, and thanks again for pointing me in the right direction!
     
    NiklasBorglund likes this.
  29. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    Hey, thanks for this awesome plugin. However, i have an issue on 5.4.0b13 when building :
    Error building Player: Failed to load language with ISO-639 code: fr. Unable to find a corresponding SmartCultureInfo

    But it works fine in the editor.
     
  30. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    EDIT : Well, I restarted Unity and the problem is gone.
     
  31. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Ok :) Great.

    I'll keep a lookout for any similar issues. What platform were you building towards?
     
  32. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    I was building for Android
     
  33. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    I re-imported SmartLocalization and the problem went away. No idea what caused it.
     
    NiklasBorglund likes this.
  34. Jabbah76

    Jabbah76

    Joined:
    Jul 29, 2015
    Posts:
    6
    Hello,

    I'm trying out Smart Localization and it's working great.
    However, I'm using Textmesh Pro, and I was wondering if I can use Smart Localization in combination with Textmesh Pro. I tried adding the LocalizedText script to a Textmesh Pro gameobject but that doesn't work.
    If I could get this to work, I'll probably purchase the Pro version.

    Any thoughts? Thanks!
     
  35. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Hi - yeah the LocalizedText script is made for the built in uGUI, but I would say that a script for textmesh pro would work in a similar way.

    You would have to create a new script - LocalizedTextMeshPro or similar. Copy the contents of LocalizedText and change the "Text" variable to the type that holds TextMeshPro instance. You might also need to change where the text is set to the correct method or property.

    I don't own TextMesh Pro, but hopefully this will help :)
     
    Jabbah76 likes this.
  36. Jabbah76

    Jabbah76

    Joined:
    Jul 29, 2015
    Posts:
    6
    It does. Thanks a lot!
     
    NiklasBorglund likes this.
  37. BAIZOR

    BAIZOR

    Joined:
    Jul 4, 2013
    Posts:
    112
    Hi there!

    I have a problem. When I try to translate through the plugin I almost always receive the error:
    How can I fix it? Thanks!
     
  38. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Hi,

    Usually one gets that error when you use the Microsoft Azure credentials instead of the Microsoft Translation credentials. Microsoft lets you translate a few strings with the Azure account for some reason before it stops.

    I wrote a guide on it a while ago - http://www.janetech.co/blog/2015/12/19/how-to-use-microsoft-translator-with-smart-localization

    Hope that helps
     
  39. anpd03

    anpd03

    Joined:
    Aug 7, 2013
    Posts:
    65
    Any chance we could create the root language file from an excel file? Or import a language file and set that as the root file?
     
  40. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Unfortunately no, not at the moment. But If you could convert the language file from XLS to RESX - you could just replace the Language.resx file in the workspace folder (in an empty/new Smart Localization project).

    However, it would be a nice feature - I have written it down as a feature request :)
     
  41. anpd03

    anpd03

    Joined:
    Aug 7, 2013
    Posts:
    65
    Thanks, tried that and it works great :)
     
    NiklasBorglund likes this.
  42. Thorny2000

    Thorny2000

    Joined:
    Sep 18, 2014
    Posts:
    53
    I'm using the Pro version. Exporting text seems to be encoded wrongly. e.g. Russian for example a string that is in the editor that reads "Точки", in the csv file in Excel it is "Точки". What am I doing wrong? I used the export button, csv comma delimiter. Is there some encoding setting I need to set?


    - Forget it, xls works fine, that'll do.
     
    Last edited: Jun 17, 2016
  43. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Ok, I'm glad xls works. But we should look into the issue with russian - we are exporting all characters in utf-8 - so it should work.

    Did you see the characters correctly if you open it in a text editor? or was the issue only when opening it in Excel?
     
  44. Thorny2000

    Thorny2000

    Joined:
    Sep 18, 2014
    Posts:
    53
    Ah - just Excel, in notepad they are fine.
     
  45. thomas_triplefun

    thomas_triplefun

    Joined:
    Sep 24, 2014
    Posts:
    25
    Hello, at first, thanks for this plugin, it's very usefull.
    But i've got a bug when I click on "Edit Root Language File" or any "Translate" button, nothing happens (other buttons seems work but I don't use it).
    I use Smart Localization Pro, on Unity 5.3.5p4

    And when unity load file i've got this following issue:
    Failed to unload 'Assets//Extensions/codeandweb.com/Editor//SettingsTexturePackerImporter.asset'
    UnityEditor.AssetDatabase:Refresh(ImportAssetOptions)
    SmartLocalization.Editor.CustomResxImporter:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Extensions/SmartLocalization/Scripts/Editor/FileOperations/CustomResxImporter.cs:61)
    UnityEditor.AssetPostprocessingInternal:postprocessAllAssets(String[], String[], String[], String[], String[])
     
  46. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    That shouldn't happen :p Do you know if this happens on a completely new project as well?

    I will look into it.
     
  47. thomas_triplefun

    thomas_triplefun

    Joined:
    Sep 24, 2014
    Posts:
    25
    No it's not happens on a new project. So I delete all smart localisation and reinstall it on the project and it works now.
     
  48. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    Thanks, we'll have a look and post in this thread when we find something.
     
  49. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262
    I have created a new version with a fix for this (v.2.4.2) and submitted it to the asset store.

    It should be up on the store within a few days. If you want the new version before that, just send me your invoice number for the PRO version to janetechgames[at]gmail[dot]com.

    That goes for everyone with the PRO version experiencing this issue.

    I don't think this issue affects the free version since I didn't manage to reproduce the issue there - but I uploaded a new version to the store there as well just in case.
     
  50. NiklasBorglund

    NiklasBorglund

    Joined:
    Feb 9, 2012
    Posts:
    262