@@ -61,14 +61,27 @@ + (ChannelPluginSettings *)settings:(id)json {
6161 }
6262
6363 NSString *language = [RCTConvert NSString: json[@" language" ]];
64- if ([language isEqualToString: @" ko" ]) {
65- settings.language = CHLocaleKorean;
66- } else if ([language isEqualToString: @" ja" ]) {
67- settings.language = CHLocaleJapanese;
68- } else if ([language isEqualToString: @" en" ]) {
69- settings.language = CHLocaleEnglish;
64+ NSString *locale = [RCTConvert NSString: json[@" locale" ]];
65+ if (json[@" locale" ] != 0 ) {
66+ if ([locale isEqualToString: @" ko" ]) {
67+ settings.language = CHLocaleKorean;
68+ } else if ([locale isEqualToString: @" ja" ]) {
69+ settings.language = CHLocaleJapanese;
70+ } else if ([locale isEqualToString: @" en" ]) {
71+ settings.language = CHLocaleEnglish;
72+ } else {
73+ settings.language = CHLocaleDevice;
74+ }
7075 } else {
71- settings.language = CHLocaleDevice;
76+ if ([language isEqualToString: @" ko" ]) {
77+ settings.language = CHLocaleKorean;
78+ } else if ([language isEqualToString: @" ja" ]) {
79+ settings.language = CHLocaleJapanese;
80+ } else if ([language isEqualToString: @" en" ]) {
81+ settings.language = CHLocaleEnglish;
82+ } else {
83+ settings.language = CHLocaleDevice;
84+ }
7285 }
7386 return settings;
7487}
0 commit comments