You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TShock supports automatic language detection based on your system regional settings. If you want to override this, set the `TSHOCK_LANGUAGE` environment variable to a different language, or pass the `-lang` command line argument to change the language.
Theoretically TShock will detect the locale, but Terraria.Program.RunGame (orig_RunGame for OTAPI) calls LanguageManager.SetLanguage(GameCulture.DefaultCulture), which indirectly overwrite the CurrentUICulture to enUS.
Thus, the I18n.TranslationCultureInfo is always enUS if no TSHOCK_LANGUAGE, -lang or -language.
TShock/docs/lang.md
Line 1 in a7360b6
Theoretically TShock will detect the locale, but
Terraria.Program.RunGame
(orig_RunGame
for OTAPI) callsLanguageManager.SetLanguage(GameCulture.DefaultCulture)
, which indirectly overwrite theCurrentUICulture
toenUS
.Thus, the
I18n.TranslationCultureInfo
is alwaysenUS
if noTSHOCK_LANGUAGE
,-lang
or-language
.TShock/TShockAPI/I18n.cs
Line 63 in a7360b6
The call of
SetLanguage
happens before TShock and plugins, so the original value ofCurrentUICulture
is no longer available.Some potential fix:
CultureInfo.s_currentThreadUICulture
to null.CultureInfo.GetUserDefaultCulture
.CultureInfo.InstalledUICulture
.The text was updated successfully, but these errors were encountered: