function ChatLocalization.tryLocalize(n,A)if existingKey[A]then return n:Get(existingKey[A],A)end for M,N in pairs(existingKey)do if string.find(A,M)then local y=n:Get(N,M)return string.gsub(A,M,y,1)end end return A end return ChatLocalization

function ChatLocalization:tryLocalize(rawString)
	if existingKey[rawString] then
		return self:Get(existingKey[rawString], rawString)
	end
	for enString, localizationKey in pairs(existingKey) do
		if string.find(rawString, enString) then
			local localizedPart = self:Get(localizationKey, enString)
			return string.gsub(rawString, enString, localizedPart, 1)
		end
	end
	return rawString
end

return ChatLocalization
