function TranslationHelper.translateByKey(e,X)local y=""local j=false if foundPlayerTranslator then j=pcall(function()y=playerTranslator:FormatByKey(e,X)end)end if foundFallbackTranslator and not j then j=pcall(function()y=fallbackTranslator:FormatByKey(e,X)end)end if j then return y else return false end end return TranslationHelper


function TranslationHelper.translateByKey(key, arguments)
	local translation = ""
	local foundTranslation = false

	-- First tries to translate for the player's language (if a translator was found)
	if foundPlayerTranslator then
		foundTranslation = pcall(function()
			translation = playerTranslator:FormatByKey(key, arguments)
		end)
	end
	if foundFallbackTranslator and not foundTranslation then
		foundTranslation = pcall(function()
			translation = fallbackTranslator:FormatByKey(key, arguments)
		end)
	end
	if foundTranslation then
		return translation
	else
		return false
	end
end

return TranslationHelper
