MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / LanguageGetIDFromLocale

Function LanguageGetIDFromLocale

src/openrct2/localisation/Language.cpp:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 // clang-format on
56
57 uint8_t LanguageGetIDFromLocale(const char* locale)
58 {
59 uint8_t i = 0;
60 for (const auto& langDesc : LanguagesDescriptors)
61 {
62 if (String::equals(locale, langDesc.locale))
63 {
64 return i;
65 }
66 i++;
67 }
68 return LANGUAGE_UNDEFINED;
69 }
70
71 const char* LanguageGetString(StringId id)
72 {

Callers 3

GetLocaleLanguageFunction · 0.85
GetLocaleLanguageFunction · 0.85
ReadJsonMethod · 0.85

Calls 1

equalsFunction · 0.85

Tested by

no test coverage detected