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

Function GetLocaleLanguage

src/openrct2/platform/Platform.Emscripten.cpp:70–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 }
69
70 uint16_t GetLocaleLanguage()
71 {
72 auto locale = reinterpret_cast<char*>(EM_ASM_PTR({
73 const locale = Intl.DateTimeFormat().resolvedOptions().locale;
74 return stringToNewUTF8(locale);
75 }));
76 auto languageId = LanguageGetIDFromLocale(locale);
77 free(locale);
78 return languageId;
79 }
80
81 CurrencyType GetLocaleCurrency()
82 {

Callers

nothing calls this directly

Calls 1

LanguageGetIDFromLocaleFunction · 0.85

Tested by

no test coverage detected