Skip to content

Commit

Permalink
fix(Language): Add Japanese language
Browse files Browse the repository at this point in the history
Fix #552
  • Loading branch information
Belphemur committed Apr 2, 2021
1 parent f5c23b6 commit d02a3c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions SoundSwitch/Localization/Factory/Lang/Langs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,15 @@ public class SlovenianLang : ILang
public Language TypeEnum => Language.Slovenian;
public string Label => "Slovenščina";
}

public class JapaneseLang : ILang
{
/// <summary>
/// Culture info of this language
/// </summary>
public CultureInfo CultureInfo => CultureInfo.GetCultureInfo("jp");

public Language TypeEnum => Language.Japanese;
public string Label => "日本語";
}
}
3 changes: 2 additions & 1 deletion SoundSwitch/Localization/Factory/Language.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public enum Language
Dutch,
Croatian,
ChineseTrad,
Slovenian
Slovenian,
Japanese
}
}
3 changes: 2 additions & 1 deletion SoundSwitch/Localization/Factory/LanguageFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public LanguageFactory() : base(new EnumImplList<Language, ILang>
new DutchLang(),
new CroatianLang(),
new ChineseTraditionalLang(),
new SlovenianLang()
new SlovenianLang(),
new JapaneseLang()
})
{
}
Expand Down

0 comments on commit d02a3c3

Please sign in to comment.