File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Flow.Launcher.Core/Resource Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,15 @@ public static void ChangeCultureInfo(string languageCode)
184
184
{
185
185
// Culture of main thread
186
186
// Use CreateSpecificCulture to preserve possible user-override settings in Windows, if Flow's language culture is the same as Windows's
187
- var currentCulture = CultureInfo . CreateSpecificCulture ( languageCode ) ;
187
+ CultureInfo currentCulture ;
188
+ try
189
+ {
190
+ currentCulture = CultureInfo . CreateSpecificCulture ( languageCode ) ;
191
+ }
192
+ catch ( CultureNotFoundException )
193
+ {
194
+ currentCulture = CultureInfo . CreateSpecificCulture ( SystemLanguageCode ) ;
195
+ }
188
196
CultureInfo . CurrentCulture = currentCulture ;
189
197
CultureInfo . CurrentUICulture = currentCulture ;
190
198
var thread = Thread . CurrentThread ;
You can’t perform that action at this time.
0 commit comments