Class ClientLanguageExtensions
Extension methods for the Dalamud.Game.ClientLanguage class.
Assembly: Dalamud.dll
View Source
Declaration
public static class ClientLanguageExtensions
Methods
ToLumina(ClientLanguage)
Converts a Dalamud ClientLanguage to the corresponding Lumina variant.
View Source
Declaration
public static Language ToLumina(this ClientLanguage language)
Returns
Lumina.Data.Language
: Converted language.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.ClientLanguage | language | Language to convert. |
ToCode(ClientLanguage)
Gets the language code from a ClientLanguage.
View Source
Declaration
public static string ToCode(this ClientLanguage value)
Returns
System.String
: The language code (ja, en, de, fr).
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.ClientLanguage | value | The ClientLanguage to convert. |
Exceptions
System.ArgumentOutOfRangeException
An exception that is thrown when no valid ClientLanguage was given.
ToClientLanguage(string)
Gets the ClientLanguage from a language code.
View Source
Declaration
public static ClientLanguage ToClientLanguage(this string value)
Returns
Dalamud.Game.ClientLanguage: The ClientLanguage.
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The language code to convert (ja, en, de, fr). |
Exceptions
System.ArgumentOutOfRangeException
An exception that is thrown when no valid language code was given.