直接调用android自带的SDK
#if UNITY_ANDROID && !UNITY_EDITOR AndroidJavaClass localeClass = new AndroidJavaClass("java/util/Locale"); AndroidJavaObject defaultLocale = localeClass.CallStatic<AndroidJavaObject>("getDefault"); AndroidJavaObject usLocale = localeClass.GetStatic<AndroidJavaObject>("US"); string systemLanguage = defaultLocale.Call<string>("getDisplayLanguage", usLocale); Debug.Log("systemLanguage:" + systemLanguage); SystemLanguage code; try { code = (SystemLanguage)Enum.Parse(typeof(SystemLanguage), systemLanguage); } catch { code = SystemLanguage.Unknown; } #else SystemLanguage code = Application.systemLanguage; #endif