nw::Language
-
struct Language
Constants and related properties for supported languages.
Note
Might not be identical to what the game uses… yet. Short codes taken from https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes. Encodings are probably right.
Public Static Functions
-
static StringView encoding(LanguageID lang)
Gets the encoding for a particular language.
-
static LanguageID from_string(StringView lang)
Converts string (short or long form) to ID.
-
static bool has_feminine(LanguageID lang)
Determines if language has feminine translations.
-
static std::pair<LanguageID, bool> to_base_id(uint32_t lang)
Convert runtime language identifier to base language and bool indicating masc/fem.
-
static uint32_t to_runtime_id(LanguageID lang, bool feminine = false)
Convert language ID to runtime identifier.
-
static StringView to_string(LanguageID lang, bool long_name = false)
Converts language to string form.
-
static StringView encoding(LanguageID lang)