
if (IsConfigurableAddOn("StatCompare")) then
	if (GetLocale() == "zhCN") then
		MOD_INFO_STAT_TITLE = "信息统计";

		MOD_INFO_COMPARISON_STAT_COMPARE = "装备属性统计";
	elseif (GetLocale() == "zhTW") then
		MOD_INFO_STAT_TITLE = "信息統計";

		MOD_INFO_COMPARISON_STAT_COMPARE = "裝備屬性統計";
	else
		MOD_INFO_STAT_TITLE = "Info Stat";

		MOD_INFO_COMPARISON_STAT_COMPARE = "Stat Compare";
	end

	ModManagement_RegisterMod(
		"InfoStat",
		"Interface\\Icons\\INV_Jewelry_Necklace_22",
		MOD_INFO_STAT_TITLE,
		"",
		nil
	);

	ModManagement_RegisterCheckBox(
		"InfoStat",
		MOD_INFO_COMPARISON_STAT_COMPARE,
		nil,
		"EnableStatCompare",
		1,
		function (arg)
			if ( arg == 1 ) then
				if (not IsAddOnLoaded("StatCompare")) then
					LoadAddOn("StatCompare");
				end
				
				if (IsAddOnLoaded("StatCompare")) then
					STATCOMPARE_Toggle(true);
				end
			else
				if (IsAddOnLoaded("StatCompare")) then
					STATCOMPARE_Toggle(false);
				end
			end
		end
	);
end

