Adding New language

How can I add new language in this which can be switchable manually?

using UnityEngine;
using TMPro;

public class MyLocalisation : MonoBehaviour
{
    public string EnglishWord;
    public string SpanishWord;

    private void Update()
    {
        if (Lean.Localization.LeanLocalization.CurrentLanguage == "English")
        {
            if (this.GetComponent<TextMeshProUGUI>().text != EnglishWord)
            {
                this.GetComponent<TextMeshProUGUI>().text = EnglishWord;
            }
        }
        else
        {
            if (this.GetComponent<TextMeshProUGUI>().text != SpanishWord)
            {
                this.GetComponent<TextMeshProUGUI>().text = SpanishWord;
            }
        }
    }
}

You have a Unity tutorial about localisation here: Recorded Video Session: Localization Tools - Unity Learn

1 Like

Thanks APSchmidt