--[=[
	Extracts the locale from the folder, or a locale and table.

	@param tableName string -- Used for source
	@param first Instance | string
	@param second table?
	@return LocalizationTable
]=]

function JsonToLocalizationTable.toLocalizationTable(tableName, first, second)
	assert(type(tableName) == "string", "Bad tableName")

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