-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Windows 7 warning in Russian (#82)
- Loading branch information
1 parent
2fd3d27
commit 49e480e
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Threading; | ||
|
||
namespace SS14.Launcher.Utility; | ||
|
||
public static class Language | ||
{ | ||
/// <summary> | ||
/// Checks if the user's current culture or UI culture matches the given language. | ||
/// </summary> | ||
/// <param name="language">Two letter ISO language name, for example "ru".</param> | ||
/// <returns>true if either the user's current culture or UI culture match the given language.</returns> | ||
public static bool UserHasLanguage(string language) | ||
{ | ||
var thread = Thread.CurrentThread; | ||
|
||
return thread.CurrentCulture.TwoLetterISOLanguageName == language || | ||
thread.CurrentUICulture.TwoLetterISOLanguageName == language; | ||
} | ||
} |