

function replaceLabelArgs (label, args) {
	var argCount = 0;

	if(typeof args !== "object") {
		label = label.replace("{0}", args);
	} else {
		argCount = args.length;
		for(i=0; i < argCount; i = i + 1) {
			var replaceArgs = "{" + i + "}";
			label = label.replace("{" + i + "}", args[i]);
		}
	}
	return label;

}

var commonLabels = {
    "visitingProfile" : "Cargando perfil"
}

var permissionsLabels = {
	"mainTitle" : "Permisos del perfil",
    "subTitle" : "Establecer opciones de la visibilidad del perfil"
}

var charStats = {
	"friendsCountNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"friendCountN\">0</strong> <span class=\"statsBlueText\">Amigos</span>", args);    },
	"friendsCountPlusOnlineNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"friendCountP\">0</strong> <span class=\"statsBlueText\">Amigos</span>", args);    },
	"goldCountNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"goldCount\">0</strong> <span class=\"statsBlueText\">Monedas</span>", args);    },
	"tokensCountNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"tokenCount\">0</strong> <span class=\"statsBlueText\">Station Cash&#8482;</span>", args);    },
	"levelCountNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"levelText\">0</strong> <span class=\"statsBlueText\">Niveles ganados en todas las profesiones</span>", args);    },
	"collectionsCountNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"collectionCount\">0</strong> <span class=\"statsBlueText\">Colecciones comenzadas</span>", args);    },
	"questsCountNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"questCount\">0</strong> <span class=\"statsBlueText\">Misiones completadas</span>", args);    },
	"leaderboardCountNone" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"leaderboardCount\">0</strong> <span class=\"statsBlueText\">Listas de clasificaci\u00F3n</span>", args);    },

	"friendsCount" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"friendCountN\">1</strong> <span class=\"statsBlueText\">Amigo</span>", args);    },
	"friendsCountPlusOnline" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"friendCountP\">1</strong> <span class=\"statsBlueText\">Amigo ({1} en l\u00EDnea)</span>", args);    },
	"goldCount" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"goldCount\">1</strong> <span class=\"statsBlueText\">Moneda</span>", args);    },
	"tokensCount" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"tokenCount\">1</strong> <span class=\"statsBlueText\">Station Cash&#8482;</span>", args);    },
	"levelCount" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"levelText\">1</strong> <span class=\"statsBlueText\">Nivel aumentado en todas las profesiones</span>", args);    },
	"collectionsCount" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"collectionCount\">1</strong> <span class=\"statsBlueText\">Colecci\u00F3n comenzada</span>", args);    },
	"questsCount" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"questCount\">1</strong> <span class=\"statsBlueText\">Misi\u00F3n completada</span>", args);    },
	"leaderboardCount" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"leaderboardCount\">1</strong> <span class=\"statsBlueText\">Lista de clasificaci\u00F3n</span>", args);    },
	
	"friendsCountPlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"friendCountN\">{0}</strong> <span class=\"statsBlueText\">Amigos</span>", args);    },
	"friendsCountPlusOnlinePlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"friendCountP\">{0}</strong> <span class=\"statsBlueText\">Amigos ({1} en l\u00EDnea)</span>", args);    },
	"goldCountPlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"goldCount\">{0}</strong> <span class=\"statsBlueText\">Monedas</span>", args);    },
	"tokensCountPlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"tokenCount\">{0}</strong> <span class=\"statsBlueText\">Station Cash&#8482;</span>", args);    },
	"levelCountPlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"levelText\">{0}</strong> <span class=\"statsBlueText\">Niveles ganados en todas las profesiones</span>", args);    },
	"collectionsCountPlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"collectionCount\">{0}</strong> <span class=\"statsBlueText\">Colecciones comenzadas</span>", args);    },
	"questsCountPlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"questCount\">{0}</strong> <span class=\"statsBlueText\">Misiones completadas</span>", args);    },
	"leaderboardCountPlural" : function (args) { return replaceLabelArgs("&nbsp;<strong id=\"leaderboardCount\">{0}</strong> <span class=\"statsBlueText\">Listas de clasificaciones</span>", args);    }	
}

var charLabels = {
	"deleteCharMainTitle" : "\u00BFQuieres eliminar este personaje?",
    "deleteCharSubTitle" : "Esto no se puede deshacer.",
	"deleteNameMismatch" : function (args) { return replaceLabelArgs("No has escrito \"borrar\". Escribe la palabra \"borrar\" para confirmar. ", args);    },
	"profileSettings" : "Ajustes del perfil",
	"friendsView" : "Vista de amigo",
	"myProfile" : "Mi perfil",
	"manageProfileButton" : "Administrador de perfil",
	"portraitGalleryButton" : "Galer\u00EDa de retratos",
	"deleteCharButton" : "Borrar personaje",
	"deleteText" : "borrar",
	"charNameSubHeader" : "Mi perfil"
}

var friendLabels = {
	"mainHeader" : "Lista de amigos",
    "subHeader" :  function (args) { return replaceLabelArgs("Amigos de {0}", args);    },
    "onlineFriends" :  function (args) { return replaceLabelArgs("Amigos en l\u00EDnea: {0}", args);    },
    "offlineFriends" :  function (args) { return replaceLabelArgs("Amigos fuera de l\u00EDnea: {0}", args);    },
    "zoneDetails" :  function (args) { return replaceLabelArgs("Zona: {0}", args);    },
    "lastLogin" :  function (args) { return replaceLabelArgs("\u00DAltima vez conectado:<br>{0} ", args);    },
    "viewProfile" :  "Ver perfil",
    "joinFriend" :  "Unirte a un amigo en el juego"
}

var newsLabels = {
	"mainHeader" : "Hilos de informaci\u00F3n",
	"showDetails" : "Mostrar detalles",
	"hideDetails" : "Esconder detalles",
	"noNews" : "No se encuentras nuevas historias"
}

var galleryLabels = {
	"mainHeader" : "Galer\u00EDa de retratos"
}

var commentsLabels = {
	"mainHeader" : "Mensajes de amigos",
    "reported" : "\u00A1Gracias! Hemos publicado tu comentario.",
    "removeMsg" : "\u00BFSeguro?",
    "noMsgs" : "No se han encontrado mensajes."
}

var leaderboardLabels = {
	"mainHeader" : "Clasificaci\u00F3n",
	"myStarsLB" : "Mi clasificaci\u00F3n",
	"friendsStarsLB" : "Clasificaci\u00F3n en lista de amigos",
	"rank" : "Clasificaci\u00F3n",
	"lbName" : "Nombre de la clasificaci\u00F3n",
	"achievement" : "Logro",
	"score" : "Max.",
	"when" : "Cu\u00E1ndo",
	"server" : "Servidor",
	"myStarsLB" : "Mi clasificaci\u00F3n",
	"noResultsFound" : "No se han encontrado resultados para esta clasificaci\u00F3n.",
	"myLbLoading" : "Cargando datos",
	"myLbNotListed" : "Este personaje no aparece en ninguna clasificaci\u00F3n.",
	"knockouts" : "Derrotas",
    "stars" : "Estrellas",
    "time" : "Tiempo",
    "view" : "Ver clasificaci\u00F3n",
	"minutes" : "mn.",
	"seconds" : "seg.",
	"viewMyScores" : "Ver mis clasificaciones",
	"viewAllScores" : "Ver clasificaci\u00F3n",
	"noneFound" : "\u00BFA\u00FAn no est\u00E1s en la lista de clasificaci\u00F3n? \u00A1Te est\u00E1s perdiendo de toda la diversi\u00F3n de los minijuegos de Free Realms!"
}