Unity Community


Page 1 of 3 123 LastLast
Results 1 to 20 of 51

  1. Location
    Sweden
    Posts
    91

    [RELEASED] Smart Localization for Unity3D

    Name:  SmartLocalizationUnityBanner.png
Views: 4044
Size:  38.8 KB
    Our new plugin called Smart Localization is released on the asset store!

    • Create support of a new language within the click of a button
    • Works with both Unity Pro and Free
    • Supports Automatic Translations with Microsoft Translator
    • Localize assets with an easy to use drag & drop interface
    • Exports language files into .resx file format


    Asset Store Link: https://www.assetstore.unity3d.com/#/content/7543
    Github Link: https://github.com/NiklasBorglund/SmartLocalization

    Video Tutorial
    Web Player Demo
    Web player demo with localized assets
    Support Mail

    Smart Localization works with both Unity Pro and Free.
    Localizing your game has never been this easy!
    Supporting multiple languages in games is becoming increasingly popular, and with Smart Localization you can get full support with just a few mouse clicks!

    Name:  smartLocalizationInfoNew.png
Views: 4115
Size:  1.25 MB

    Smart Localization automatically creates a new folder structure where you can save all your localization data.It saves the language files in the .resx file format. ResX is commonly used for globalization and localization. A wide variety of software is used to translate .resx files.

    This plugin also supports Automatic Translations with Microsoft Translator.
    All you have to do is to create a Microsoft Translator account and paste in your credentials in the main window and press "Save" and "Authenticate". The translate language window will show a drop down menu of languages to translate from if that specific language is supported. Microsoft Translator gives you 2 million characters to translate each month for free.
    Guide to get a Microsoft Translator Account

    Documentation.

    I'll post some of the basics right here.
    Code:  
    1. //Returns a text value in the current language for the key
    2. string myKey = LanguageManager.Instance.GetTextValue("MYKEY");
    3.  
    4. //Gets the audio clip for the current language
    5. AudioClip myClip = LanguageManager.Instance.GetAudioClip("MYKEY");
    6.  
    7. //Gets the prefab game object for the current language
    8. GameObject myPrefab = LanguageManager.Instance.GetPrefab("MYKEY");
    9.  
    10. //Gets the texture for the current language
    11. Texture myTexture = LanguageManager.Instance.GetTexture("MYKEY");
    12.  
    13. //To cache the LanguageManager in a variable
    14. LanguageManager languageManager = LanguageManager.Instance;
    15.  
    16. //Get a list of all the available languages
    17. List<string> availableLanguages = LanguageManager.Instance.AvailableLanguages;
    18.  
    19. //Get a list of all the available languages (System.Globalization.CultureInfo)
    20. List<CultureInfo> availableLanguages = LanguageManager.Instance.AvailableLanguagesCulture  Info;
    21.  
    22. //Get the system language( string = "en" "sv" "es" etc.)
    23. string systemLanguage = LanguageManager.Instance.GetSystemLanguage();
    24.  
    25. //Check if a language is supported(string = "en" "sv" "es" etc.)
    26. LanguageManager.Instance.IsLanguageSupported("en");
    27.  
    28. //Change a language(string = "en" "sv" "es" etc., Make sure the language is supported)
    29. LanguageManager.Instance.ChangeLanguage("en");
    30.  
    31. //Set the default language(The language that will be loaded(if it exists) at startup)
    32. //takes System.Globalization.CultureInfo or string
    33. LanguageManager.Instance.SetDefaultLanguage("en");
    34. LanguageManager.Instance.SetDefaultLanguage(currentCultureInfo);

    This is a video tutorial explaining all the basics and how the system works.


    A video tutorial explaining how the features in version 1.1 works


    Current version 1.1
    NEW FEATURE: Drag & Drop Interface for localized Prefabs
    NEW FEATURE: Drag & Drop Interface for localized Audio Clips
    NEW FEATURE: Drag & Drop Interface for localized Textures
    NEW FEATURE: Complete automatic folder structure for localized assets
    NEW FEATURE: Define keys to a type
    NEW FEATURE: Delete languages from editor

    Asset Store Link: https://www.assetstore.unity3d.com/#/content/7543
    Github Link: https://github.com/NiklasBorglund/SmartLocalization

    Edit: This plugin should work on most platforms since it only uses .txt files at runtime. However, some problems have been noticed by users on WP8 and Metro since it uses a different version of the .NET framework.
    Last edited by NiklasBorglund; 11-23-2013 at 10:38 AM.


  2. Location
    Sweden
    Posts
    91
    Just generated a better documentation of all the classes with doxygen.

    Smart Localization Documentation


  3. Location
    Sweden
    Posts
    91
    Smart Localization 1.1 is submitted to the asset store!

    Version 1.1. will add drag & drop interface for prefabs, textures and audio clips which will make it extremely easy to localize assets within your game.
    It will also copy your assets into an automatic folder structure, keeping track of all your localized assets.
    Name:  Skärmavbild 2013-03-21 kl. 10.30.23.png
Views: 4006
Size:  12.4 KB

    Version 1.1 will be available on the Asset Store soon.


  4. Location
    Sweden
    Posts
    91

    Version 1.1 is released!

    Smart Localization 1.1 is released.
    NEW FEATURE: Drag & Drop Interface for localized Prefabs
    NEW FEATURE: Drag & Drop Interface for localized Audio Clips
    NEW FEATURE: Drag & Drop Interface for localized Textures
    NEW FEATURE: Complete automatic folder structure for localized assets
    NEW FEATURE: Define keys to a type
    NEW FEATURE: Delete languages from editor

    Web player demo with the new features.

    A video tutorial explaining how the new update works.


  5. Posts
    907
    Great Idea and neat little package.

    Question: I have an excel file with all of the languages, does the package have some sort of batch input so that I don't have to enter every single entry?

    Thanks.



  6. Location
    Sweden
    Posts
    91
    Quote Originally Posted by rocki View Post
    Great Idea and neat little package.

    Question: I have an excel file with all of the languages, does the package have some sort of batch input so that I don't have to enter every single entry?

    Thanks.
    No, there's unfortunately no feature like that in the package. What you could do however, is to try and convert your .xls file into a .resx file and compare with how the .resx created in the Smart Localization plugin looks and change accordingly.
    They should not be that different(if any), depending on how your excel file looks.

    Found a tool that might be worth a look http://www.codeproject.com/Articles/...nguage-support

    Hope that helps!

    Quote Originally Posted by silkroadgame View Post
    Congrats!It's looking good and attracting!
    Thanks!

  7. im im is offline

    Location
    springfield
    Posts
    903
    Thanks Niklas!

    Thanks for creating this great asset and for releasing and supporting it for free!

    Best regards,

    me

    one little thing

    I was running the demo and when I try to translate from English to French using Microsoft Translation Server I'm intermittently getting

    WebException: The remote server returned an error: (400) Bad Request.
    System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result)
    System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data)
    any ideas what maybe causing it?
    Last edited by im; 08-08-2013 at 02:37 AM.


  8. Location
    Sweden
    Posts
    91
    Quote Originally Posted by im View Post
    Thanks Niklas!

    Thanks for creating this great asset and for releasing and supporting it for free!

    Best regards,

    me

    one little thing

    I was running the demo and when I try to translate from English to French using Microsoft Translation Server I'm intermittently getting



    any ideas what maybe causing it?

    Thanks! I'm glad you like it

    I'm planning on taking some time soon and solve the reported problems. So it can take a few days or so, but I'm on it

    Regarding your issue, does it behave like that even when you try to translate to another language? Or is it just French that's giving you problems?


  9. Posts
    29
    Hi and thanks for making this plugin.

    However we seem to be having difficulties making this run on Windows phone 8 as the microsoft's version (.NET 4.0) of the CultureInfo class doesn't have a method called GetCultureInfo. We tried replacing this with new CultureInfo but seem to be getting some weird errors that don't look even remotely connected to the CultureInfo class.
    Could you please assist us with solving this?

    Thanks again.


  10. Location
    Sweden
    Posts
    91
    Quote Originally Posted by FREEZX View Post
    Hi and thanks for making this plugin.

    However we seem to be having difficulties making this run on Windows phone 8 as the microsoft's version (.NET 4.0) of the CultureInfo class doesn't have a method called GetCultureInfo. We tried replacing this with new CultureInfo but seem to be getting some weird errors that don't look even remotely connected to the CultureInfo class.
    Could you please assist us with solving this?

    Thanks again.
    Do Windows Phone 8 use some kind of subset of .Net 4.0? If so, can you send me a link to the documentation? Because if i'm looking at the .Net 4.0 docs, they do seem to have a function called GetCultureInfo - http://msdn.microsoft.com/en-us/libr...v=vs.100).aspx

    It is a weird error you are getting though, but read elements and load language should not have anything to do with the culture info class. Does the languages created in the Resources folder look alright?


  11. Posts
    29
    Quote Originally Posted by NiklasBorglund View Post
    Do Windows Phone 8 use some kind of subset of .Net 4.0? If so, can you send me a link to the documentation? Because if i'm looking at the .Net 4.0 docs, they do seem to have a function called GetCultureInfo - http://msdn.microsoft.com/en-us/libr...v=vs.100).aspx

    It is a weird error you are getting though, but read elements and load language should not have anything to do with the culture info class. Does the languages created in the Resources folder look alright?
    This is the documentation page for WP8
    http://msdn.microsoft.com/en-US/libr...vs.105%29.aspx


  12. Location
    Sweden
    Posts
    91
    Quote Originally Posted by FREEZX View Post
    This is the documentation page for WP8
    http://msdn.microsoft.com/en-US/libr...vs.105%29.aspx
    You can still use all the functions in the editor, right? It's only when you build to the phone the errors come?

    I'm not in a position to try this on WP8 yet, but you could try and put some special cases (that only turns in effect when you run in wp8 ) in the LanguageManager and only use the List<string> availableLanguages in there. (Like in GetAvailableLanguages() in line 291)

    Some pseudocode:
    Code:  
    1. #if !WINDOWS_PHONE_PLATFORM
    2. ....Any code that's related to the CultureInfo class.
    3. #endif

    Can't seem to find a define for the windows 8 phone platform, maybe i looked in the wrong places(http://docs.unity3d.com/Documentatio...mpilation.html)

    EDIT: Found it. It's UNITY_WP8 . (https://docs.unity3d.com/Documentati...l/wp8-faq.html)

    The Localization System itself is not dependant on the CultureInfo class. What matters is the language strings in the availableLanguages list. That contains the necessary strings like "en" "es" "fr" "sv" to load the languages.

    Hope that helps. Let me know if it worked. I'll also look into the issue some more.


  13. Location
    East Yorkshire, UK
    Posts
    1,100
    Thanks for the package but I'm also getting this error when I try and auto translate:

    WebException: The remote server returned an error: (400) Bad Request.
    System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result)
    System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data)
    And then sometimes this one after about a minute of waiting:
    SocketException: Connection timed out
    System.Net.Sockets.Socket+SocketAsyncResult.CheckI fThrowDelayedException ()
    System.Net.Sockets.Socket.EndReceive (IAsyncResult asyncResult, System.Net.Sockets.SocketError& errorCode)
    System.Net.Sockets.Socket.EndReceive (IAsyncResult result)
    System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar)
    Rethrow as IOException: EndRead failure
    System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar)
    System.Net.WebConnection.ReadDone (IAsyncResult result)
    Rethrow as WebException: Error getting response stream (ReadDone1): ReceiveFailure
    System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
    Last edited by derkoi; 09-23-2013 at 07:44 AM.
    Unity 5 pre-ordered.
    Officially licensed Sony developer.


  14. Location
    Sweden
    Posts
    91
    Hi,

    Sorry for the delay. I've fixed some of the bugs on this project now, there's still some things left to be fixed - but overall things should work a lot better now.

    Changes:
    * Sorted the keys in alphabetical order
    * Saved the language file properly with the XMLWriter
    * Several bug fixes
    * Some code refactoring

    However, this version is not uploaded to the Asset Store(yet), it needs some testing. I have uploaded the complete project on github until then under the MIT - License, so feel free to use it.

    https://github.com/NiklasBorglund/SmartLocalization

    To use it in your project, just download the code from github and replace the contents in the SmartLocalization folder with that. Make sure to backup your project before attempting this.

    I will try and find the time within the next few days to test it and upload the latest version to the asset store as well.
    Any questions, comments or feedback can be sent in this thread or DM me on twitter.
    Last edited by NiklasBorglund; 09-29-2013 at 12:06 PM.


  15. Location
    Indonesia
    Posts
    10

    Fix for Windows Phone 8 + Few Playmaker Actions!

    Hi, thank you for this very nice free asset

    I'm developing mini games for Windows Phone 8 and I really need SmartLocalization for my next project.

    I've attached my workaround to be able to use SmartLocalization in WP8, and gladly this tweak worked well! (at least for GetTextValue).

    I hope you can merge my packages with your code so that next version of SmartLocalization in asset store will support Windows Phone 8 out of the box + Playmaker.

    Looking forward to see this asset grab its popularity!
    Attached Files


  16. Location
    Sweden
    Posts
    91
    Quote Originally Posted by kdimas View Post
    Hi, thank you for this very nice free asset

    I'm developing mini games for Windows Phone 8 and I really need SmartLocalization for my next project.

    I've attached my workaround to be able to use SmartLocalization in WP8, and gladly this tweak worked well! (at least for GetTextValue).

    I hope you can merge my packages with your code so that next version of SmartLocalization in asset store will support Windows Phone 8 out of the box + Playmaker.

    Looking forward to see this asset grab its popularity!
    That's great! Thank you!

    I just added your WP8 changes to the code and submitted all the latest changes to the asset store.(1.3)

    It can take up to a week before it gets accepted though so if you want the latest code right now - you can download it from here: https://github.com/NiklasBorglund/SmartLocalization

    Unfortunately I do not own playmaker, so I can't test your addons for that. Maybe there's a possibility to create a github fork or something for supporting extensions until we can find a more sustainable solution.


  17. Location
    Indonesia
    Posts
    10
    Quote Originally Posted by NiklasBorglund View Post
    That's great! Thank you!

    I just added your WP8 changes to the code and submitted all the latest changes to the asset store.(1.3)

    It can take up to a week before it gets accepted though so if you want the latest code right now - you can download it from here: https://github.com/NiklasBorglund/SmartLocalization

    Unfortunately I do not own playmaker, so I can't test your addons for that. Maybe there's a possibility to create a github fork or something for supporting extensions until we can find a more sustainable solution.
    Nice! I think I shall create own repo for SmartLocalization Playmaker Addon


  18. Posts
    36
    I imported your 1.3 version and I am still getting:

    Error building Player: Exception: Error: type `System.Globalization.CultureTypes` doesn't exist in target framework.

    In the GetSystemLanguage() Method


  19. Location
    Indonesia
    Posts
    10
    Quote Originally Posted by Ogien View Post
    I imported your 1.3 version and I am still getting:

    Error building Player: Exception: Error: type `System.Globalization.CultureTypes` doesn't exist in target framework.

    In the GetSystemLanguage() Method
    Modify LanguageManager.cs, line 538, current code still missing platform definition, current code:
    Code:  
    1. CultureInfo[] cultureInfos = CultureInfo.GetCultures(CultureTypes.AllCultures);
    2. foreach(CultureInfo info in cultureInfos)
    3. {
    4.     if(info.EnglishName == systemLanguage)
    5.     {
    6.         return info.Name;   
    7.     }
    8. }

    Add platform definition like this:
    Code:  
    1. #if !UNITY_WP8
    2. CultureInfo[] cultureInfos = CultureInfo.GetCultures(CultureTypes.AllCultures);
    3. foreach(CultureInfo info in cultureInfos)
    4. {
    5.     if(info.EnglishName == systemLanguage)
    6.     {
    7.         return info.Name;   
    8.     }
    9. }
    10. #endif

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •