Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save louis-e/99ec03f5dfd34e93878642297cbb4602 to your computer and use it in GitHub Desktop.
Save louis-e/99ec03f5dfd34e93878642297cbb4602 to your computer and use it in GitHub Desktop.
Because in Unity/C# UnityApplication.systemLanguage doesn't support Hindi, you can use this C# code snippet to recognize a Hindi system language
//NOTE: This only works for Android
using (AndroidJavaClass cls = new AndroidJavaClass("java.util.Locale"))
{
using (AndroidJavaObject locale = cls.CallStatic<AndroidJavaObject>("getDefault"))
{
if (locale.Call<string>("getDisplayLanguage") == "हिन्दी")
{
//HINDI
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment