---------------------------------------------------------------------------------------------------
-- RuneCalc Locales
---------------------------------------------------------------------------------------------------
local locales = {
	rus = { -- Russian, Win-1251
		[ "Settings" ] = "Параметры",
		[ "Price of 1000 Gold Dust" ] = "Цена 1000 золотой пыли",
		[ "gPotato Exchange Rate" ] = "Курс кристалла",
		[ "Price of 1 Crystal Chip" ] = "Цена 1 кристаллической крошки",
		[ "RuneCalc Description" ] = "Вычисляет стоимость руны в золоте",
		[ "Apply" ] = "Применить",
	},
	eng = { -- English, Latin-1
		[ "Settings" ] = "Settings",
		[ "Price of 1000 Gold Dust" ] = "Price of 1000 Gold Dust",
		[ "gPotato Exchange Rate" ] = "gPotato Exchange Rate",
		[ "Price of 1 Crystal Chip" ] = "Price of 1 Crystal Chip",
		[ "RuneCalc Description" ] = "Calculates the cost of runes in gold",
		[ "Apply" ] = "Apply",
	},
	ger = { -- German, Win-1252
		[ "Settings" ] = "Einstellungen",
		[ "Price of 1000 Gold Dust" ] = "Preis von 1000 Gold Dust",
		[ "gPotato Exchange Rate" ] = "gPotato Wechselkurs",
		[ "Price of 1 Crystal Chip" ] = "Preis von 1 Crystal Chip",
		[ "RuneCalc Description" ] = "Calculates the cost of runes in gold",
		[ "Apply" ] = "Bewerben",
	},
	fra = { -- French, Win-1252
		[ "Settings" ] = "Paramиtres",
		[ "Price of 1000 Gold Dust" ] = "Prix de 1000 Poussiиre d'or",
		[ "gPotato Exchange Rate" ] = "gPotato taux de change",
		[ "Price of 1 Crystal Chip" ] = "Prix de la puce 1 Crystal",
		[ "RuneCalc Description" ] = "Calculates the cost of runes in gold",
		[ "Apply" ] = "Appliquer",
	},
	br = {  -- Portuguese, Win-1252
		[ "Settings" ] = "Configuraзхes",
		[ "Price of 1000 Gold Dust" ] = "Preзo de 1000 Gold Dust",
		[ "gPotato Exchange Rate" ] = "gPotato Taxa de Cвmbio",
		[ "Price of 1 Crystal Chip" ] = "Preзo de 1 Crystal Chip",
		[ "RuneCalc Description" ] = "Calculates the cost of runes in gold",
		[ "Apply" ] = "Aplicar",
	},
	jpn = {  -- Japanese, Shift-JIS
		[ "Settings" ] = "Settings",
		[ "Price of 1000 Gold Dust" ] = "Price of 1000 Gold Dust",
		[ "gPotato Exchange Rate" ] = "gPotato Exchange Rate",
		[ "Price of 1 Crystal Chip" ] = "Price of 1 Crystal Chip",
		[ "RuneCalc Description" ] = "Calculates the cost of runes in gold",
		[ "Apply" ] = "Apply",
	}
}

Global( "L", locales[ "eng" ] )
---------------------------------------------------------------------------------------------------
-- AO game Localization detection by SLA. Version 2011-02-10.
function GetGameLocalization()
	local B = cartographer.GetMapBlocks()
	local T = {	rus="\203\232\227\224",
			eng="Holy Land",
			ger="Heiliges Land",
			fra="Terre Sacr\233e",
			br="Terra Sagrada",
			jpn="\131\74\131\106\131\65" }
	for b in B do
		for l,t in T do
			if userMods.FromWString( cartographer.GetMapBlockInfo(B [b] ).name ) == t
				then return l
			end;
		end;
	end;
	return "eng"
end
---------------------------------------------------------------------------------------------------
function LocalizationInit()
	L = locales[ GetGameLocalization() ]
end
---------------------------------------------------------------------------------------------------