useGrafikpfad = 'images/fr/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' : ['Seconde', 'Secondes'],
  		'MINUTE' : ['Minute', 'Minutes'],
  		'HOUR' : ['Heure', 'Heures'],
  		'DAY' : ['Jour', 'Jours'],
  		'ABORT' : 'Abandonner',
  		'AREANAME_0' : 'Océan',
  		'AREANAME_7' : 'Forêt aux chuchotements',
  		'AREANAME_8' : 'Plaine aux éclats',
  		'AREANAME_9' : 'Étang nouveau',
  		'AREANAME_10' : 'Lichterhain',
  		'AREANAME_11' : 'Vallées d\'émeraude',
  		'AREANAME_12' : 'Pays de Damagra',
  		'AREANAME_13' : 'Moderia',
  		'AREANAME_14' : 'Désert chantant',
  		'AREANAME_15' : 'Vallée verrée',
  		'HIRE_PACK_QUESTION' : 'Voulez-vous vraiment engager l\'équipe de soldats \'{0}\'?',
  		'JS_NO_MONSTERS_ON_FIELD' : 'Aucun monstre',
  		'JS_MONSTER_DISPLAY_DEACTIVATED' : 'L\'indicateur de monstres est déactivé',
  		'QUEUE_ENTRY_READY' : 'Achevé',
		'BUILDING_PLACEMENT_INFO' : 'Positionnez le bâtiment à l\'endroit souhaité dans la cité en bougeant la souris. Cliquez ensuite sur le bouton gauche afin de commencer la construction.[couleur=tomate]. Les domaines verts seront supprimés pendant le positionnement. Les domaines rouges ne peuvent pas être supprimés.[/couleur] Si toutefois vous ne voulez pas ériger le bâtiment, fermez tout simplement cette fenêtre et le positionnement sera ainsi interrompu.',
		'INFO_MENU_HH' : 'Construction de bâtiments',
		'INFO_MENU_BIBO' : 'Bibliothèque',
		'INFO_MENU_TEMPEL' : 'Temple',
		'INFO_MENU_HEXE' : 'Laboratoire',
		'INFO_MENU_KASERNE' : 'Caserne',
		'INFO_MENU_FRIEDHOF' : 'Cimetière',
		'INFO_MENU_DRACHENHOF' : 'Garderie des dragons',
		'INFO_MENU_SCHATTENPORTAL' : 'Portail des ombres',
		'INFO_MENU_VERTEIDIGUNG' : 'Défense',
		'INFO_MENU_MARKT' : 'Marché',
		'INFO_MENU_HANDEL' : 'Commerce',
		'INFO_MENU_WAPPEN' : 'Blasons',
		'INFO_MENU_TRUPPEN' : 'Troupes',
		'INFO_MENU_EINHEITEN' : 'Unités',
		'INFO_MENU_KARTE' : 'Carte',
		'INFO_MENU_AREA' : 'Régions',
		'INFO_MENU_GRUPPE' : 'Guilde',
		'INFO_MENU_KRIEG' : 'Guerres',
		'INFO_MENU_TOPLIST1' : 'Liste des meilleurs n° 1',
		'INFO_MENU_TOPLIST2' : 'Liste des meilleurs n°2',
		'INFO_MENU_TOPLISTG' : 'Liste des meilleures guildes',
		'INFO_MENU_IGM' : 'Messages',
		'INFO_MENU_HILFE' : 'Aide',
		'INFO_MENU_SONSTIGES' : 'Divers',
		'INFO_MENU_TAVERN' : 'Taverne',
		'INFO_MENU_COMMITMENT' : 'INFO_MENU_COMMITMENT',
		'INFO_MENU_TOURNEY' : 'INFO_MENU_TOURNEY',
		'INFO_MENU_SETTLESHOP' : 'INFO_MENU_SETTLESHOP',
		'GTYPE_ANARCHIE_BONUS' : 'L\'anarchie règne. Deux fois par mois (le 1 et le 15), tous les membres de la guilde reçoivent involontairement des nouvelles diverses. Chaque fois que cela arrive, un message informatif là-dessus est envoyé aux nouveuax responsables.',
		'GTYPE_SCHATTENBRUT_BONUS' : 'Au couvain d\'ombres les fonctions de la guilde sont distribuées quotidiennement à 4h30 selon l\'influence des joueurs. Elle dépend à son tour du nombre d\'habitants possédés. Le joueur plus puissant obtient donc la position plus importante. En ordre descendant, les autres fonctions sont distribuées comme suit: successeur, général, ministre et mage.',
		'GTYPE_RITUALISTEN_BONUS' : 'Les ritualistes tiennent particulièrement aux sacrifices. Les fonctions sont distribuées chaque jour à 4h30 selon le nombre de points de sacrifice des membres. Plus le nombre de points de sacrifice est élevé, plus le titulaire d\'un certain poste est puissant. Les postes sont distribués de manière descendante: chef de groupe, successeur, général, ministre et mage.',
		'GTYPE_JAEGER_SAMMLER_BONUS' : 'Le maître des chasseurs et guêteurs est celui qui détient la plus grande production. Il domine la guilde et jouit de certains privilèges. Chaque après-midi à 4h30 les autres fonctions sont distribuées de manière descendante selon la quantité de matières premières produite: successeur, général, ministre, mage.',
		'MAX_TRADE_DIFF_X' : 'La différence de valeur peut avoir tout au plus {0}% caractères!',
		'TRADE_DIFF_OKAY' : 'L\'équilibre entre les ressources OK!',
		'ORE' : 'Minerai',
		'GOLD' : 'Or',
		'WOOD' : 'Bois',
		'FOOD' : 'Nourriture',
		'SILVER' : 'Argent',
		'DURATION_UNTIL_ENDTIME' : '{0} à {1}',
		'ENTER_TEMPLATE_NAME' : 'Comment intituler ce modèle?',
		'YES' : 'Oui',
		'NO' : 'Non',
		'MONSTERFIELD_TYPE_0' : 'Mélangé',
		'MONSTERFIELD_TYPE_1' : 'Combat corps à corps',
		'MONSTERFIELD_TYPE_2' : 'Combat à distance',
		'MONSTERFIELD_TYPE_3' : 'Magie de combat',
		'MONSTERFIELD_TYPE_4' : 'Magie de soutien',
		'MONSTERFIELD_CHALLENGE' : '(Défi)',
		'SAVE_NOTES' : 'Sauvegarder les blocs-notes',
		'CLOSE_NOTES' : 'Fermer',
		'ITEM_COSTS_POPUP' : 'L\'élément \'{0}\' change la capacité d\'une unité de [b]{1} PC (points de charge) [/b] et on a besoin de [b]{2} points de sacrifice[/b] pour l\'équiper de manière appropriée. Voici les frais : \n\n[img]{3}/icons/20x20/erz.gif[/img][b] Minerai:[/b] {4} - [img]{3}/icons/20x20/gold.gif[/img][b] Or:[/b] {5} - [img]{3}/icons/20x20/holz.gif[/img][b] Bois:[/b] {6} - [img]{3}/icons/20x20/nahrung_{7}.gif[/img][b] Nourriture:[/b] {8} - [img]{3}/icons/20x20/silber.gif[/img][b] Argent:[/b] {9}',
		'DO_REPAIR' : 'Réparer',
		'REPAIR_MARKET_RES' : 'Les ressources suivantes vous manquent pour pouvoir [b]réparer[/b]:',
		'HEAL_UNITS' : 'Guérir des unités',
		'HEAL_MARKET_RES' : 'Les ressources suivantes vous manquent pour pouvoir [b]guérir[/b]:',
		'MISSING_RES' : 'Ressources manquantes'
	},
	
	/**
	  * 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(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);
	}


}