function TranslationHelper.translateByKey(A,r)local t=""local B=false if foundPlayerTranslator then B=pcall(function()t=playerTranslator:FormatByKey(A,r)end)end if foundFallbackTranslator and not B then B=pcall(function()t=fallbackTranslator:FormatByKey(A,r)end)end if B then return t else return false end end return TranslationHelper
-- Create a FormatByKey() function that uses a fallback translator if the first fails to load or return successfully

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
