-- It's important we update all icons when a players language changes to account for changes in the width of text, etc

task.spawn(function()
	local success, translator = pcall(function() return localizationService:GetTranslatorForPlayerAsync(localPlayer) end)
	local function updateAllIcons()
		local icons = IconController.getIcons()
		for _, icon in pairs(icons) do
			icon:_updateAll()
		end
	end
	if success then
		IconController.translator = translator
		translator:GetPropertyChangedSignal("LocaleId"):Connect(updateAllIcons)
		task.spawn(updateAllIcons)
		task.delay(1, updateAllIcons)
		task.delay(10, updateAllIcons)
	end
end)


return IconController
