mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
rename GetSystemLanguageCode method + add comment
This commit is contained in:
parent
66b3f5af0d
commit
0e700cdfcc
1 changed files with 5 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ namespace Flow.Launcher.Core.Resource
|
|||
public Internationalization()
|
||||
{
|
||||
AddFlowLauncherLanguageDirectory();
|
||||
SystemLanguageCode = GetSystemLanguageCode();
|
||||
SystemLanguageCode = GetSystemLanguageCodeAtStartup();
|
||||
}
|
||||
|
||||
private void AddFlowLauncherLanguageDirectory()
|
||||
|
|
@ -37,11 +37,13 @@ namespace Flow.Launcher.Core.Resource
|
|||
_languageDirectories.Add(directory);
|
||||
}
|
||||
|
||||
private static string GetSystemLanguageCode()
|
||||
private static string GetSystemLanguageCodeAtStartup()
|
||||
{
|
||||
var availableLanguages = AvailableLanguages.GetAvailableLanguages();
|
||||
|
||||
// Retrieve the language identifiers for the current culture
|
||||
// Retrieve the language identifiers for the current culture.
|
||||
// ChangeLanguage method overrides the CultureInfo.CurrentCulture, so this needs to
|
||||
// be called at startup in order to get the correct lang code of system.
|
||||
var currentCulture = CultureInfo.CurrentCulture;
|
||||
var twoLetterCode = currentCulture.TwoLetterISOLanguageName;
|
||||
var threeLetterCode = currentCulture.ThreeLetterISOLanguageName;
|
||||
|
|
|
|||
Loading…
Reference in a new issue