From 7b5fac6e29bd153f1a01cb1fb6a7f4f83a89ef92 Mon Sep 17 00:00:00 2001 From: Argus <32637590+Argus-cpp@users.noreply.github.com> Date: Tue, 24 Oct 2023 16:48:55 +0300 Subject: [PATCH] Add DarkRP.getPhraseLocalized --- gamemode/modules/language/sh_language.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemode/modules/language/sh_language.lua b/gamemode/modules/language/sh_language.lua index e3ecbb4ea..62891ddc5 100644 --- a/gamemode/modules/language/sh_language.lua +++ b/gamemode/modules/language/sh_language.lua @@ -28,8 +28,8 @@ function DarkRP.getPhrase(name, ...) return (langTable[name] or rp_languages.en[name]) and string.format(langTable[name] or rp_languages.en[name], ...) or nil end -function DarkRP.getPhraseLocalized(name, ply, ...) - local lang = ply and ply:IsValid() and ply:GetInfo("gmod_language") or selectedLanguage +function DarkRP.getPhraseLocalized(ply, name, ...) + local lang = IsValid(ply) and ply:GetInfo("gmod_language") or selectedLanguage local langTable = rp_languages[lang] or rp_languages.en return (langTable[name] or rp_languages.en[name]) and string.format(langTable[name] or rp_languages.en[name], ...) or nil