Skip to main content

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
TypeNameDescription
Dalamud.Game.ClientLanguagelanguageLanguage 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
TypeNameDescription
Dalamud.Game.ClientLanguagevalueThe 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
TypeNameDescription
System.StringvalueThe language code to convert (ja, en, de, fr).
Exceptions

System.ArgumentOutOfRangeException
An exception that is thrown when no valid language code was given.