Skip to content

Commit e8c39f4

Browse files
committed
-
1 parent 51e695a commit e8c39f4

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

Plugins/CS/Device.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public static void PlayHaptics(UIImpactFeedbackStyle style, float intensity)
106106
public static string GetLocaleISOCode() => Device_GetLocaleISOCode();
107107

108108
/// <summary>
109-
/// 获取当前设备语言的ISO码(ISO 3166-1 alpha-2
109+
/// 获取当前设备语言的ISO码(例:zh-Hans-CN
110110
/// </summary>
111-
/// <returns>ISO 3166-1 alpha-2</returns>
111+
/// <returns>语言ISO码</returns>
112112
public static string GetLanguageISOCode() => Device_GetLanguageISOCode();
113113
}
114114
}

Plugins/Native/Implementations/Device.mm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ +(NSString *)GetLocaleISOCode{
8181
+(NSString *)GetLanguageISOCode
8282
{
8383
NSString *lang = [NSLocale preferredLanguages].firstObject;
84-
NSLocale *locale = [NSLocale localeWithLocaleIdentifier:lang];
85-
NSString *languageCode = [locale languageCode];
86-
return languageCode;
84+
return lang;
8785
}
8886
@end

0 commit comments

Comments
 (0)