Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 8ce4dce

Browse files
committed
Robustify language code derivation
1 parent 9900182 commit 8ce4dce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/ios/app/MBXViewController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ - (NSString *)bestLanguageForUser
932932
NSString *bestLanguage;
933933

934934
for (NSString *language in preferredLanguages) {
935-
NSString *thisLanguage = [language substringToIndex:2];
935+
NSString *thisLanguage = [NSLocale localeWithLocaleIdentifier:language].languageCode;
936936
if ([supportedLanguages containsObject:thisLanguage])
937937
{
938938
bestLanguage = thisLanguage;

0 commit comments

Comments
 (0)