function JSONTranslator.new(...)local m=setmetatable({},JSONTranslator)m._localizationTable=JsonToLocalizationTable.toLocalizationTable(...)m._englishTranslator=m._localizationTable:GetTranslator("\101\110")m._fallbacks={}if RunService:IsRunning()then m._promiseTranslator=LocalizationServiceUtils.promiseTranslator(Players.LocalPlayer)else m._promiseTranslator=Promise.resolved(m._englishTranslator)end if RunService:IsStudio()then PseudoLocalize.addToLocalizationTable(m._localizationTable,nil,"\101\110")end return m end function JSONTranslator.GetLocalizationTable(m)return m._localizationTable end

function JSONTranslator.new(...)
	local self = setmetatable({}, JSONTranslator)

	-- Cache localizaiton table, because it can take 10-20ms to load.
	self._localizationTable = JsonToLocalizationTable.toLocalizationTable(...)
	self._englishTranslator = self._localizationTable:GetTranslator("en")
	self._fallbacks = {}

	if RunService:IsRunning() then
		self._promiseTranslator = LocalizationServiceUtils.promiseTranslator(Players.LocalPlayer)
	else
		self._promiseTranslator = Promise.resolved(self._englishTranslator)
	end

	if RunService:IsStudio() then
		PseudoLocalize.addToLocalizationTable(self._localizationTable, nil, "en")
	end

	return self
end

function JSONTranslator:GetLocalizationTable()
	return self._localizationTable
end
