View Categories

Get Current Langauge

Description

Returns the currently selected language in a string format.

Type

Method

Syntax

string currentLanguage = loxisManager.getCurrentLangauge(); 

Example

using UnityEngine;
using AMACreative.Loxis;

public class LangaugeChangeTester : MonoBehavior

// Get reference to a LoxisManager instance through the inspector
[SerializeField] private LoxisManager loxisManager;

    private void Start()
    {
        string currentLanguage = loxisManager.getCurrentLangauge();
        
        if (currentLanguage == "English")
        {
            Debug.Log("It's English");
        }
        else
        {
            Debug.Log("It's not English");
        }
    }
} 

Leave a Reply

Your email address will not be published. Required fields are marked *