From 27ef51fe7911f047d2a79e9171a35bdf035fe593 Mon Sep 17 00:00:00 2001 From: Antoine Aflalo Date: Mon, 8 Apr 2024 10:43:50 -0400 Subject: [PATCH] boost(language): Add Swedish translations fixes #1431 --- SoundSwitch/Localization/Factory/Lang/Langs.cs | 10 ++++++++++ SoundSwitch/Localization/Factory/Language.cs | 3 ++- SoundSwitch/Localization/Factory/LanguageFactory.cs | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/SoundSwitch/Localization/Factory/Lang/Langs.cs b/SoundSwitch/Localization/Factory/Lang/Langs.cs index db1a06d5a9..32e0e3b783 100644 --- a/SoundSwitch/Localization/Factory/Lang/Langs.cs +++ b/SoundSwitch/Localization/Factory/Lang/Langs.cs @@ -265,4 +265,14 @@ public class Bulgarian : BaseLang public override Language TypeEnum => Language.Bulgarian; } + + public class Swedish : BaseLang + { + /// + /// Culture info of this language + /// + public override CultureInfo CultureInfo => CultureInfo.GetCultureInfo("sv-SE"); + + public override Language TypeEnum => Language.Swedish; + } } diff --git a/SoundSwitch/Localization/Factory/Language.cs b/SoundSwitch/Localization/Factory/Language.cs index 309740fdcf..0e9b1c7a0d 100644 --- a/SoundSwitch/Localization/Factory/Language.cs +++ b/SoundSwitch/Localization/Factory/Language.cs @@ -44,6 +44,7 @@ public enum Language Serbian, Danish, Ukrainian, - Bulgarian + Bulgarian, + Swedish, } } diff --git a/SoundSwitch/Localization/Factory/LanguageFactory.cs b/SoundSwitch/Localization/Factory/LanguageFactory.cs index 2d30b84172..6fdebc4439 100644 --- a/SoundSwitch/Localization/Factory/LanguageFactory.cs +++ b/SoundSwitch/Localization/Factory/LanguageFactory.cs @@ -34,7 +34,8 @@ public LanguageFactory() : base(new EnumImplList new Serbian(), new Danish(), new Ukrainian(), - new Bulgarian() + new Bulgarian(), + new Swedish() }) { }