useGrafikpfad = 'images/pt/grafikpack-full';

var I18N = {
	'wordTable' : {
		'noObjInFrontOfAds' : 'Bitte die das Objekt nicht vor die Werbung schieben - auch DL braucht Werbung :/',
		'tavernTableEmpty' : 'Tisch {0} ist unbesetzt!',
		'tavernTableInfo' : 'Tischinfo',
		'tavernTableWithId' : 'Tisch {0}',
  		'DECIMAL_POINT' : ',',
  		'THOUSANDS_SEP' : '.',
  		'SECOND' : ['Segundo', 'Segundos'],
  		'MINUTE' : ['Minuto', 'Minutos'],
  		'HOUR' : ['Hora', 'Horas'],
  		'DAY' : ['Dia', 'Dias'],
  		'ABORT' : 'Cancelar',
  		'AREANAME_0' : 'Oceano',
  		'AREANAME_7' : 'Floresta Sussurrante',
  		'AREANAME_8' : 'Planície Arrepiante',
  		'AREANAME_9' : 'Nag\'rd Nöj',
  		'AREANAME_10' : 'Bosque das Luzes',
  		'AREANAME_11' : 'Vale esmeralda',
  		'AREANAME_12' : 'Terra de Damagra',
  		'AREANAME_13' : 'Moderia',
  		'AREANAME_14' : 'Deserto Cantante',
  		'AREANAME_15' : 'Vale de Cristal',
  		'HIRE_PACK_QUESTION' : 'Contratar realmente a equipa de Mercenários \'{0}\'?',
  		'JS_NO_MONSTERS_ON_FIELD' : 'Nenhum Monstro',
  		'JS_MONSTER_DISPLAY_DEACTIVATED' : 'Desactivar visualização do monstro',
  		'QUEUE_ENTRY_READY' : 'Realizado',
		'BUILDING_PLACEMENT_INFO' : 'Coloque o edifício no local desejado da sua cidade, movendo o seu rato. Clique no local desejado, com o botão esquerdo do rato para iniciar a construção. [color = tomate] Os espaços verdes podem ser usados para construção, enquanto as áreas vermelhas não podem. [/ color] Se você ainda não quer erguer o edifício, simplesmente feche a janela e a escolha de local para a colocação é cancelada.',
		'INFO_MENU_HH' : 'Construção de <u>e</u>difícios',
		'INFO_MENU_BIBO' : '<u>B</u>iblioteca',
		'INFO_MENU_TEMPEL' : 'Temp<u>l</u>o',
		'INFO_MENU_HEXE' : 'Laboratório',
		'INFO_MENU_KASERNE' : '<u>C</u>aserna',
		'INFO_MENU_FRIEDHOF' : '<u>C</u>emitério',
		'INFO_MENU_DRACHENHOF' : '<u>T</u>oca do Dragão',
		'INFO_MENU_SCHATTENPORTAL' : 'Po<u>r</u>tal das sombras',
		'INFO_MENU_VERTEIDIGUNG' : '<u>M</u>uralha',
		'INFO_MENU_MARKT' : 'M<u>e</u>rcado',
		'INFO_MENU_HANDEL' : 'Negócio',
		'INFO_MENU_WAPPEN' : '<u>B</u>rasão',
		'INFO_MENU_TRUPPEN' : '<u>P</u>elotão',
		'INFO_MENU_EINHEITEN' : '<u>U</u>nidades',
		'INFO_MENU_KARTE' : 'Ma<u>p</u>a',
		'INFO_MENU_AREA' : 'Área',
		'INFO_MENU_GRUPPE' : '<u>G</u>uilda',
		'INFO_MENU_KRIEG' : 'Guerra',
		'INFO_MENU_TOPLIST1' : 'Top list 1',
		'INFO_MENU_TOPLIST2' : 'Top list 2',
		'INFO_MENU_TOPLISTG' : 'Top list de Guilda',
		'INFO_MENU_IGM' : '<u>M</u>ensagens',
		'INFO_MENU_HILFE' : '<u>A</u>juda',
		'INFO_MENU_SONSTIGES' : 'Diversos',
		'INFO_MENU_TAVERN' : 'Taberna',
		'INFO_MENU_COMMITMENT' : 'INFO_MENU_COMMITMENT',
		'INFO_MENU_TOURNEY' : 'INFO_MENU_TOURNEY',
		'INFO_MENU_SETTLESHOP' : 'INFO_MENU_SETTLESHOP',
		'GTYPE_ANARCHIE_BONUS' : 'A anarquia reina, duas vezes por mês (dia 1. e 15.) os posto dentro das Guildas são redivididos entre os vários membros dessa Guilda. Uma mensagem informativa será enviada aos novos possuidores de cargos, quando isso acontecer.',
		'GTYPE_SCHATTENBRUT_BONUS' : 'Nos Crias das Sombras os postos da Guilda serão redistribuídos, diariamente (às 4:30), os postos da Guilda, segundo o poder de cada (número de moradores). O jogador mais poderoso será então o líder automático. Os Postos seguintes são, o sucessor, General, Ministro e Mago.',
		'GTYPE_RITUALISTEN_BONUS' : 'Os Ritualistas dão muita importância aos sacrifícios. Os postos na Guilda serão diariamente (às  4:30) distribuídos pelos membros da Guilda, consoante a quantidade de Pontos de Sacrifício. Quantos mais pontos de Sacrifício mais alto será o seu posto na hierarquia. Os jogadores estão todos assim possibilitados a serem, Lider de Guilda, Sucessor, General, Ministro ou Mago.',
		'GTYPE_JAEGER_SAMMLER_BONUS' : 'Para os Caçadores e Recolectores que tiverem o privilégio de liderarem a sua Guilda, que conseguiu o maior nível de produção. Com o aumento do nível de produção de um jogador, assim serão os postos (Sucessor, General, Ministro e Mago) redistribuídos (täglich um 4:30).',
		'MAX_TRADE_DIFF_X' : 'Diferença de valor pode ser no max. {0}%!',
		'TRADE_DIFF_OKAY' : 'Quantidade de recursos OK!',
		'ORE' : 'Ferro',
		'GOLD' : 'Ouro',
		'WOOD' : 'Madeira',
		'FOOD' : 'Alimento',
		'SILVER' : 'Prata',
		'DURATION_UNTIL_ENDTIME' : '{0} até {1}',
		'ENTER_TEMPLATE_NAME' : 'Como se deve chamar o modelo?',
		'YES' : 'Sim',
		'NO' : 'Não',
		'MONSTERFIELD_TYPE_0' : 'Misturado',
		'MONSTERFIELD_TYPE_1' : 'Combate de proximidade',
		'MONSTERFIELD_TYPE_2' : 'Combate à distância',
		'MONSTERFIELD_TYPE_3' : 'Magia de Combate',
		'MONSTERFIELD_TYPE_4' : 'Magia de Apoio',
		'MONSTERFIELD_CHALLENGE' : '(Desafio)',
		'SAVE_NOTES' : 'Gravar Bloco de Notas',
		'CLOSE_NOTES' : 'Encerrar',
		'ITEM_COSTS_POPUP' : 'O objecto \'{0}\' muda a capacidade de uma unidade em [b]{1} PT[/b] e precisa de [b]{2} Pontos de Sacrifício[/b] para o poder equipar. Isto custa-lhe:\n\n[img]{3}/icons/20x20/erz.gif[/img][b] Ferro:[/b] {4} - [img]{3}/icons/20x20/gold.gif[/img][b] Ouro:[/b] {5} - [img]{3}/icons/20x20/holz.gif[/img][b] Madeira:[/b] {6} - [img]{3}/icons/20x20/nahrung_{7}.gif[/img][b] Alimento:[/b] {8} - [img]{3}/icons/20x20/silber.gif[/img][b] Prata:[/b] {9}',
		'DO_REPAIR' : 'DO_REPAIR',
		'REPAIR_MARKET_RES' : 'REPAIR_MARKET_RES',
		'HEAL_UNITS' : 'Curar Unidades',
		'HEAL_MARKET_RES' : 'HEAL_MARKET_RES',
		'MISSING_RES' : 'Recursos em falta'
	},
	
	/**
	  * Format number according to the locale
	  *
	  * @param theNumber The number to be formatted
	  * @param decimalDigits The number of decimal digits can be passed to this functions, as it is not locale specific. Defaults to 0 decimal digits.
	  */
	'numberFormat' : function(theNumber, decimalDigits) {
		return(number_format(theNumber, decimalDigits, this.wordTable['DECIMAL_POINT'], this.wordTable['THOUSANDS_SEP']));
	},

	/**
	 * Format a duration according to the locale
	 *
	 * @param duration The duration to format
	 * @param showUnit (optional) If the unit shall be displayed, set this to true (default)
	 */
	 'durationFormat' : function(duration, showUnit) {
		if(duration < 60) {
		  multiplier = 1;
		  unitLangId = 'SECOND';
		} else if(duration < 3600) {
		  multiplier = 60;
		  unitLangId = 'MINUTE';
		} else if(duration < 86400) {
		  multiplier = 3600;
		  unitLangId = 'HOUR';
		} else {
		  multiplier = 86400;
		  unitLangId = 'DAY';
		}
		
		durationString = this.numberFormat(duration / multiplier, 1);
		if(durationString.indexOf(this.wordTable['DECIMAL_POINT']) != -1) { // If we have a fractionated number
			durationString = durationString.replace(/0+$/, '');						// Trim right zeroes
			if(durationString.substr(durationString.length - 1, 1) == this.wordTable['DECIMAL_POINT']) durationString = durationString.substr(0, durationString.length - 1);  // If, after trimming zeroes, the decimal point is the end of the string, remove it as well
		}
		return(durationString + (showUnit ? ' ' + this.pluralize(Math.round(duration / multiplier * 10) / 10, unitLangId) : ''));
	},
	
	/**
	  * Function to pluralize a given language object
	  *
	  * @param theNumber The number that we are seeking the plural form for
	  * @param langObjId The language object ID. This must refer to an array of objects inside this internationalization classes word table
	  */
	'pluralize' : function(theNumber, langObjId) {
		if(theNumber != 1) return(this.wordTable[langObjId][1]); // In german, everything with a count of 2 or more uses the plural
		return(this.wordTable[langObjId][0]);			// Otherwise return the singular
	},
	
	/**
	  * Returns a specific string
	  * In contrast to the PHP I18N function, this function is used rarely, only when JS strings have wildcards that must be replaced. Usually, the variables are accessed directly through the word table.
          *
	  * @param varName The variable name of the string
	  * @param params A number indexed array of values. The wildcard {0} in the string is replaced with the value at index 0 etc. If the array is empty, nothing is changed
	  */
	'getSpecificString' : function(varName, params) {
		var varVal = this.wordTable[varName];
		if(typeof(varVal) == 'undefined') return(varName);
		if(typeof(params) != 'undefined' && typeof(params.length) != 'undefined') {
			for(var i = 0, len = params.length; i < len; ++i) {
				var replacer = new RegExp('\\{' + String(i) + '\\}', 'g');
				varVal = varVal.replace(replacer, params[i]);
			}
		}
		return(varVal);
	}


}