Localization (Multi-Language) - Make your app international

Localization (Multi-Language)
Make your app international

Get it from Asset Store - Localization (Multi-Language)
For detailed implementation instructions see the Documentation
Key Features:

  • Make your app international by translating it into multiple languages fast and easy.
  • Supports all languages supported by Unity. Complete list available here
  • All settings are done inside a custom Settings Window.
  • Automatically detects the device language and if no translation is available in that language the default language will be used.
  • Saves and Loads the last language used.
  • Auto Translation implemented inside Settings Window. Automatically translations can be done by a single click inside asset.
  • Import/Export translations to .CSV files.
  • Works with Unity UI, Text Mesh Pro and nGUI.
  • Translations can be done automatically by adding a component to your text or by calling a single line of code.
  • Full example scenes included
  • All code is available and fully commented
  • Works with Unity 2017.1 and above with Free, Plus or Pro license.
  • Works on all supported Unity platforms.

Easy setup from a Settings Window:

Code example:

public class SetLanguageExample : MonoBehaviour
{

    public Text languageText;
    public Text nextText;
    public Text prevText;
    public Text playText;
    public Text exitText;
    public Text saveText;
    void Start()
    {
        RefreshTexts();
    }


    /// <summary>
    /// Set localized text for each text field
    /// </summary>
    void RefreshTexts()
    {
        languageText.text = GleyLocalization.Manager.GetCurrentLanguage().ToString();
        nextText.text = GleyLocalization.Manager.GetText("NextID");//this has the same result as using the enum like bellow
        //nextText.text = GleyLocalization.Manager.GetText(WordIDs.NextID);
        prevText.text = GleyLocalization.Manager.GetText("PrevID");
        //prevText.text = GleyLocalization.Manager.GetText(WordIDs.PrevID);
        playText.text = GleyLocalization.Manager.GetText("PlayID");
        //playText.text = GleyLocalization.Manager.GetText(WordIDs.PlayID);
        exitText.text = GleyLocalization.Manager.GetText("ExitID");
        //exitText.text = GleyLocalization.Manager.GetText(WordIDs.ExitID);
        saveText.text = GleyLocalization.Manager.GetText("SaveID");
        //saveText.text = GleyLocalization.Manager.GetText(WordIDs.SaveID);
    }


    /// <summary>
    /// Assigned from editor. Changes current language to next language
    /// </summary>
    public void NextLanguage()
    {
        GleyLocalization.Manager.NextLanguage();
        RefreshTexts();
    }


    /// <summary>
    /// Assigned from editor. Changes current language to previous language
    /// </summary>
    public void PrevLanguage()
    {
        GleyLocalization.Manager.PreviousLanguage();
        RefreshTexts();
    }


    /// <summary>
    /// Save the current selected language
    /// </summary>
    public void SaveLanguage()
    {
        GleyLocalization.Manager.SetCurrentLanguage(GleyLocalization.Manager.GetCurrentLanguage());
    }
}

For more help watch our tutorial videos:

Just added support for visual scripting tools: Bolt and Playmaker.
Get the new version from Asset Store

Thanks for guide. I have a news app that I would like to localize too. Tell me, at the expense of language translations, did you do this yourself? I found TheWordPoint translation service Mobile App Localization Services for iOS and Android , which provides similar services. Perhaps you tell me other methods? Thanks.

1 Like

Hello,

After translating maybe 15 phrases, i now get a nullreference exception when pressing translate. It seems like its trying to access an empty List / Array.

Is there some kind of rate limit on the service used to translate in editor?

Sorry to double post - but switching platforms (for example below is switching from android to ios) within unity breaks the localisation.

Makes it impossible to edit the localisation assigned to existing objects.

When switching from ios to android (the opposite from above) - all localisations are set to use the same string. Destroying hours of work in complex scenes :frowning:

Hello,
there is not a limit of translations it should work with any number of words. It will help us if you could describe in more details what your error was to be able to replicate it and fix it if it is a bug.
About the second Issue. It looks like you have compile issues when you switch your platform. Please fix all errors as it says in your warning and the components will be available again.

I get the same error. After translating about 15 words, I get null exceptions too whenever I hit translate:

NullReferenceException: Object reference not set to an instance of an object
GleyLocalization.JSONNode.Parse (System.String aJSON) (at Assets/GleyPlugins/Localization/Scripts/SimpleJSON.cs:555)
GleyLocalization.GoogleTranslation.MyUpdate () (at Assets/GleyPlugins/Localization/Scripts/Editor/GoogleTranslation.cs:41)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)

I waited a few hours and now it works again. I am with the earlier poster, it is probably a rate limiter.

Hello,
It looks like google servers have some limitation, Also try updating our plugin to the latest version and see if you are getting the same error.