function JsonToLocalizationTable.localeFromName(m)if m:sub(-5)=="\046\106\115\111\110"then return m:sub(1,#m-5)else return m end end function JsonToLocalizationTable.getOrCreateLocalizationTable()local m=LocalizationService:FindFirstChild(LOCALIZATION_TABLE_NAME)if not m then m=Instance.new("\076\111\099\097\108\105\122\097\116\105\111\110\084\097\098\108\101")m.Name=LOCALIZATION_TABLE_NAME if RunService:IsRunning()then m.Parent=LocalizationService end end return m end
--[=[
	Extracts the locale from the name
	@param name string -- The name to parse
	@return string -- The locale
]=]
function JsonToLocalizationTable.localeFromName(name)
	if name:sub(-5) == ".json" then
		return name:sub(1, #name - 5)
	else
		return name
	end
end

function JsonToLocalizationTable.getOrCreateLocalizationTable()
	local localizationTable = LocalizationService:FindFirstChild(LOCALIZATION_TABLE_NAME)

	if not localizationTable then
		localizationTable = Instance.new("LocalizationTable")
		localizationTable.Name = LOCALIZATION_TABLE_NAME

		if RunService:IsRunning() then
			localizationTable.Parent = LocalizationService
		end
	end

	return localizationTable
end
