♻️ I have no idea what am I doing. Might be mixing stuff
This commit is contained in:
19
DysonNetwork.Shared/CultureService.cs
Normal file
19
DysonNetwork.Shared/CultureService.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Globalization;
|
||||
using DysonNetwork.Shared.Proto;
|
||||
|
||||
namespace DysonNetwork.Shared;
|
||||
|
||||
public static class CultureService
|
||||
{
|
||||
public static void SetCultureInfo(string? languageCode)
|
||||
{
|
||||
var info = new CultureInfo(languageCode ?? "en-us", false);
|
||||
CultureInfo.CurrentCulture = info;
|
||||
CultureInfo.CurrentUICulture = info;
|
||||
}
|
||||
|
||||
public static void SetCultureInfo(Account account)
|
||||
{
|
||||
SetCultureInfo(account.Language);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user