File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Flow.Launcher.Core/Resource Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public class Internationalization
28
28
public Internationalization ( )
29
29
{
30
30
AddFlowLauncherLanguageDirectory ( ) ;
31
- SystemLanguageCode = GetSystemLanguageCode ( ) ;
31
+ SystemLanguageCode = GetSystemLanguageCodeAtStartup ( ) ;
32
32
}
33
33
34
34
private void AddFlowLauncherLanguageDirectory ( )
@@ -37,11 +37,13 @@ private void AddFlowLauncherLanguageDirectory()
37
37
_languageDirectories . Add ( directory ) ;
38
38
}
39
39
40
- private static string GetSystemLanguageCode ( )
40
+ private static string GetSystemLanguageCodeAtStartup ( )
41
41
{
42
42
var availableLanguages = AvailableLanguages . GetAvailableLanguages ( ) ;
43
43
44
- // Retrieve the language identifiers for the current culture
44
+ // Retrieve the language identifiers for the current culture.
45
+ // ChangeLanguage method overrides the CultureInfo.CurrentCulture, so this needs to
46
+ // be called at startup in order to get the correct lang code of system.
45
47
var currentCulture = CultureInfo . CurrentCulture ;
46
48
var twoLetterCode = currentCulture . TwoLetterISOLanguageName ;
47
49
var threeLetterCode = currentCulture . ThreeLetterISOLanguageName ;
You can’t perform that action at this time.
0 commit comments