--[=[
	Extracts the locale from the folder, or a locale and table.
	@param first Instance | string
	@param second table?
	@return LocalizationTable
]=]

function JsonToLocalizationTable.toLocalizationTable(first, second)
	if typeof(first) == "Instance" then
		local result = JsonToLocalizationTable.loadFolder(first)
		-- result.Name = ("JSONTable_%s"):format(first.Name)
		return result
	elseif type(first) == "string" and type(second) == "table" then
		local result = JsonToLocalizationTable.loadTable(first, second)
		return result
	else
		error("Bad args")
	end
end
