diff --git a/gamemode/modules/language/sh_language.lua b/gamemode/modules/language/sh_language.lua index cde8ba0da..b0097cae5 100644 --- a/gamemode/modules/language/sh_language.lua +++ b/gamemode/modules/language/sh_language.lua @@ -5,6 +5,15 @@ cvars.AddChangeCallback("gmod_language", function(cv, old, new) selectedLanguage = new end) +-- Some server owners experience that the language is not set correctly on +-- startup. This provides a failsafe in case that happens. +timer.Simple(0, function() + local gmodLanguage = GetConVar("gmod_language"):GetString() + if gmodLanguage ~= "" and selectedLanguage ~= gmodLanguage then + selectedLanguage = gmodLanguage + end +end) + function DarkRP.addLanguage(name, tbl) local old = rp_languages[name] or {} rp_languages[name] = tbl