mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
* wip * hacky fix for overlapping event text in profiler * move IsResumeGameAfterPluginLoad logic to PluginManager * fix some warnings * handle exceptions properly * remove ability to cancel, rename button to "hide" instead * undo Dalamud.Service refactor for now * warnings * add explainer, show which plugins are still loading * add some text if loading takes more than 3 minutes * undo wrong CS merge
27 lines
987 B
C#
27 lines
987 B
C#
using Dalamud.Utility;
|
|
|
|
namespace Dalamud;
|
|
|
|
/// <summary>
|
|
/// Extension methods for the <see cref="ClientLanguage"/> class.
|
|
/// </summary>
|
|
[Api10ToDo("Delete this, and use Dalamud.Common.ClientLanguage instead for everything.")]
|
|
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)),
|
|
};
|
|
}
|
|
}
|