mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 12:27:43 +01:00
actually just move the language types, don't use the one from the common assembly
This commit is contained in:
parent
b212b4e00a
commit
7e397bef17
8 changed files with 13 additions and 7 deletions
26
Dalamud/Utility/ClientLanguageExtensions.cs
Normal file
26
Dalamud/Utility/ClientLanguageExtensions.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using Dalamud.Game;
|
||||
|
||||
namespace Dalamud.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for the <see cref="ClientLanguage"/> class.
|
||||
/// </summary>
|
||||
public static class ClientLanguageExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a Dalamud ClientLanguage to the corresponding Lumina variant.
|
||||
/// </summary>
|
||||
/// <param name="language">Language to convert.</param>
|
||||
/// <returns>Converted language.</returns>
|
||||
public static Lumina.Data.Language ToLumina(this ClientLanguage language)
|
||||
{
|
||||
return language switch
|
||||
{
|
||||
ClientLanguage.Japanese => Lumina.Data.Language.Japanese,
|
||||
ClientLanguage.English => Lumina.Data.Language.English,
|
||||
ClientLanguage.German => Lumina.Data.Language.German,
|
||||
ClientLanguage.French => Lumina.Data.Language.French,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(language)),
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue