﻿// lang.js: traduction for static texts

function Language()
{
    // Language, es-es by default
    this._langCode = "es-es";
    this._defaultCode = "es-es";
    
    // Elements
    this.selectingOperLabel = new Array();
    this.offlineContactLabel = new Array();
    this.offlineContactLabel2 = new Array();
    this.offlineContactLabel3 = new Array();
    this.btnGoToOffline = new Array();
    this.btnGoToVIP = new Array();    
    this.btnSend = new Array();    
    this.aumentarLetra = new Array();
    this.disminuirLetra = new Array();
    this.restaurarLetra = new Array();
    this.recibirConversacion = new Array();
    this.imgCerrar = new Array();    
    this.attendingText = new Array();
    this.requestRCText = new Array();
    this.yesRCText = new Array();
    this.noRCText = new Array();
    this.cancelRCText = new Array();
    this.messageErrorText = new Array();
    this.closingText = new Array();
    this.conversationEndByConnText = new Array();
    this.reconnectButton = new Array();
    
    this.lblTitle = new Array();
    this.infoLabel = new Array();
    this.lblUserName = new Array();
    this.lblUserMail = new Array();
    this.lblPhone = new Array();
    this.lblObservations = new Array();
    this.btnSend = new Array();
    
    this.titleLabel = new Array();
    this.text1Label = new Array();
    this.text2Label = new Array();
    this.text3Label = new Array();   
    
    this.rcActivationEntryLabel = new Array();
    this.rcActivationInstructionsLabel = new Array();
    this.rcActivationInstructionsStep1Label = new Array();
    this.rcActivationInstructionsStep2Label = new Array();
    this.rcActivationInstructionsStep3Label = new Array();
    this.rcActivationInstallLabel = new Array();
    this.rcActivationExitLabel = new Array();
    this.rcExePre = new Array();
    this.rcExeLink = new Array();
    this.rcExecNow = new Array();
    this.rcExePost = new Array();
    this.rcExeLinkMac = new Array();
    
    this.rcMacExplanation = new Array();
    this.rcActivationInstallLabel = new Array();
    this.rcActivationExitLabel = new Array();
}

// Init language system
Language.prototype.init = function()
{
    this.selectingOperLabel["es-es"] = "Seleccionando operador...";
    this.selectingOperLabel["ca-es"] = "Seleccionant operador...";
    this.selectingOperLabel["en-en"] = "Selecting operator...";
    this.selectingOperLabel["pt-br"] = "Selecionando operador...";
    
    this.offlineContactLabel["es-es"] = "Si desea que nos pongamos en contacto con usted a la mayor brevedad posible, pulse el siguiente botón.";
    this.offlineContactLabel["ca-es"] = "Si desitja que ens posem en contacte amb vostè quan quedi un operador disponible, premi el següent botó.";
    this.offlineContactLabel["en-en"] = "If you wish to be notified when an operator becomes available, click next button.";
    this.offlineContactLabel["pt-br"] = "Se preferir, podemos entrar em contato assim que um técnico estiver disponível para atendê-lo, para isso, clique no botão abaixo.";
    
    this.offlineContactLabel2["es-es"] = "Todos nuestros operadores se encuentran ocupados, disculpe las molestias. <br />Si desea ser atendido de forma prioritaria, pulse el botón PRIORIDAD y vuelva a conectarse pasados 5 minutos, su petición será atendida inmediatamente.";
    this.offlineContactLabel2["ca-es"] = "Todos nuestros operadores se encuentran ocupados, disculpe las molestias. <br />Si desea ser atendido de forma prioritaria, pulse el botón PRIORIDAD y vuelva a conectarse pasados 5 minutos, su petición será atendida inmediatamente.";
    this.offlineContactLabel2["en-en"] = "Todos nuestros operadores se encuentran ocupados, disculpe las molestias. <br />Si desea ser atendido de forma prioritaria, pulse el botón PRIORIDAD y vuelva a conectarse pasados 5 minutos, su petición será atendida inmediatamente.";
    this.offlineContactLabel2["pt-br"] = "Todos nuestros operadores se encuentran ocupados, disculpe las molestias. <br />Si desea ser atendido de forma prioritaria, pulse el botón PRIORIDAD y vuelva a conectarse pasados 5 minutos, su petición será atendida inmediatamente.";
    
    this.offlineContactLabel3["es-es"] = "Si desea que nos pongamos en contacto con usted a la mayor brevedad posible pulse el botón CONTACTAR.";
    this.offlineContactLabel3["ca-es"] = "Si desea que nos pongamos en contacto con usted a la mayor brevedad posible pulse el botón CONTACTAR.";
    this.offlineContactLabel3["en-en"] = "Si desea que nos pongamos en contacto con usted a la mayor brevedad posible pulse el botón CONTACTAR.";
    this.offlineContactLabel3["pt-br"] = "Si desea que nos pongamos en contacto con usted a la mayor brevedad posible pulse el botón CONTACTAR.";
       
    this.btnGoToOffline["es-es"] = "Contactar"; 
    this.btnGoToOffline["ca-es"] = "Contactar"; 
    this.btnGoToOffline["en-en"] = "Request"; 
    this.btnGoToOffline["pt-br"] = "Conectar";
    
    this.btnGoToVIP["es-es"] = "Prioridad"; 
    this.btnGoToVIP["ca-es"] = "Prioridad"; 
    this.btnGoToVIP["en-en"] = "Prioridad"; 
    this.btnGoToVIP["pt-br"] = "Prioridad";
    
    this.btnSend["es-es"] = "Enviar";
    this.btnSend["ca-es"] = "Enviar";
    this.btnSend["en-en"] = "Send";
    this.btnSend["pt-br"] = "Enviar";
    
    this.aumentarLetra["es-es"] = "Aumentar tamaño de letra";
    this.aumentarLetra["ca-es"] = "Augmentar mida de lletra";
    this.aumentarLetra["en-en"] = "Increase font size";
    this.aumentarLetra["pt-br"] = "Aumentar o tamanho da letra";
    
    this.disminuirLetra["es-es"] = "Disminuir tamaño de letra";
    this.disminuirLetra["ca-es"] = "Disminuir mida de lletra";
    this.disminuirLetra["en-en"] = "Decrease font size";
    this.disminuirLetra["pt-br"] = "Diminuir o tamanho da letra";
    
    this.restaurarLetra["es-es"] = "Restaurar tamaño de letra";
    this.restaurarLetra["ca-es"] = "Restaurar mida de lletra";
    this.restaurarLetra["en-en"] = "Restore font size";
    this.restaurarLetra["pt-br"] = "Restaurar o tamanho da letra";
    
    this.recibirConversacion["es-es"] = "Enviar la conversación a mi email";
    this.recibirConversacion["ca-es"] = "Enviar la conversa al meu email";
    this.recibirConversacion["en-en"] = "Send conversation to my email";
    this.recibirConversacion["pt-br"] = "Enviar a conversa por e-mail";
    
    this.imgCerrar["es-es"] = "Cerrar la ventana de chat";
    this.imgCerrar["ca-es"] = "Tancar la conversa";
    this.imgCerrar["en-en"] = "Close conversation";
    this.imgCerrar["pt-br"] = "Fechar a janela de chat";
    
    this.attendingText["es-es"] = "Le atiende:";
    this.attendingText["ca-es"] = "L'atén:";
    this.attendingText["en-en"] = "Assisted by:";
    this.attendingText["pt-br"] = "O operador que lhe atende é:";
    
    this.requestRCText["es-es"] = "Para poder ayudarle, debo tomar el control de su máquina. ¿Está de acuerdo?";
    this.requestRCText["ca-es"] = "L'operador ha sol·licitat prendre el control remot del seu equip. Accepta la petició?";
    this.requestRCText["en-en"] = "The operator wishes to start a remote control session. Do you accept?";
    this.requestRCText["pt-br"] = "O técnico solicitou permissão para acessar o seu computador remotamente. Aceita a solicitação?";
    
    this.yesRCText["es-es"] = "Sí";
    this.yesRCText["ca-es"] = "Si";
    this.yesRCText["en-en"] = "Yes";
    this.yesRCText["pt-br"] = "Sim";
    
    this.noRCText["es-es"] = "No";
    this.noRCText["ca-es"] = "No";
    this.noRCText["en-en"] = "No";
    this.noRCText["pt-br"] = "Não";
    
    this.cancelRCText["es-es"] = "Cancelar";
    this.cancelRCText["ca-es"] = "Cancel·lar";
    this.cancelRCText["en-en"] = "Cancel";
    this.cancelRCText["pt-br"] = "Cancelar";
    
    this.messageErrorText["es-es"] = "El siguiente mensaje no pudo ser enviado: ";
    this.messageErrorText["ca-es"] = "El següent missatge no va poder ser enviat: ";
    this.messageErrorText["en-en"] = "Message couldn't be sent: ";
    this.messageErrorText["pt-br"] = "A seguinte mensagem não pode ser enviada:";
    
    this.closingText["es-es"] = "¿Está seguro de que desea cerrar la asistencia remota?";
    this.closingText["ca-es"] = "Està segur que desitja tancar l'assistència remota?";
    this.closingText["en-en"] = "Are you sure you want to close the conversation?";
    this.closingText["pt-br"] = "Confirma que deseja encerrar a assistência remota ?";
       
    this.lblTitle["es-es"] = "Formulario de contacto";
    this.lblTitle["ca-es"] = "Formulari de contacte";
    this.lblTitle["en-en"] = "Contact request form";
    this.lblTitle["pt-br"] = "Formulário de contato";
    
    this.infoLabel["es-es"] = "Todos nuestros operadores están ocupados, sentimos no poder atenderle en este momento. Si lo desea, puede rellenar el siguiente formulario y nos pondremos en contacto con usted a la mayor brevedad posible.";
    this.infoLabel["ca-es"] = "Empleneu el formulari que us mostrem a continuació i en breu rebreu una resposta.";
    this.infoLabel["en-en"] = "Our operators are busy at the moment, we are sorry for not being able to attend you. Please, fill in the following form and you will be contacted as soon as possible.";
    this.infoLabel["pt-br"] = "Todos os nossos operadores estão ocupados, sentimos muito não poder atendê-lo neste momento. Se desejar, pode preencher o seguinte formulário e assim que possível entraremos em contato.";
    
    this.lblUserName["es-es"] = "Nombre";
    this.lblUserName["ca-es"] = "Nom";
    this.lblUserName["en-en"] = "Name";
    this.lblUserName["pt-br"] = "Nome";
    
    this.lblUserMail["es-es"] = "E-mail";
    this.lblUserMail["ca-es"] = "E-mail";
    this.lblUserMail["en-en"] = "E-mail";
    this.lblUserMail["pt-br"] = "E-mail";
    
    this.lblPhone["es-es"] = "Teléfono";
    this.lblPhone["ca-es"] = "Telèfon";
    this.lblPhone["en-en"] = "Phone";
    this.lblPhone["pt-br"] = "Telefone";
    
    this.lblObservations["es-es"] = "Observaciones";
    this.lblObservations["ca-es"] = "Observacions";
    this.lblObservations["en-en"] = "Comments";
    this.lblObservations["pt-br"] = "Observações";
    
    this.btnSend["es-es"] = "Enviar";
    this.btnSend["ca-es"] = "Enviar";
    this.btnSend["en-en"] = "Send";
    this.btnSend["pt-br"] = "Enviar";

    this.titleLabel["es-es"] = "Error de aplicación";
    this.titleLabel["ca-es"] = "Error d'aplicació";
    this.titleLabel["en-en"] = "Application error";
    this.titleLabel["pt-br"] = "Erro de aplicação";
    
    this.text1Label["es-es"] = "La aplicación ha encontrado un error y debe cerrarse.";
    this.text1Label["ca-es"] = "L'aplicació ha trobat un error i ha de tancar-se.";
    this.text1Label["en-en"] = "An error was found while executing application.";
    this.text1Label["pt-br"] = "O aplicativo encontrou um erro e será finalizado.";
    
    this.text2Label["es-es"] = "Vuelva a intentar conectarse pasados unos minutos y, si el error persiste, póngase en contacto con su proveedor.";
    this.text2Label["ca-es"] = "Torni a intentar connectar-se passats uns minuts i, si l'error persisteix, posi's en contacte amb el seu proveïdor.";
    this.text2Label["en-en"] = "Please, try again later. If error persists, contact your service provider.";
    this.text2Label["pt-br"] = "Por favor, volte a tentar a conexão em alguns minutos, se persistir o erro contate seu provedor.";
    
    this.text3Label["es-es"] = "Gracias y disculpe las molestias.";
    this.text3Label["ca-es"] = "Gràcies i disculpi les molèsties.";
    this.text3Label["en-en"] = "Sorry for the inconvenience.";
    this.text3Label["pt-br"] = "Obrigado";
        
    this.conversationEndByConnText["es-es"] = "La conversación ha finalizado por problemas de conexión. Puede intentar volver a conectarse pulsando:";
    this.conversationEndByConnText["ca-es"] = "La conversa ha finalitzat per problemes de connexió. Pot intentar tornar a connectar-se prement:";
    this.conversationEndByConnText["en-en"] = "Conversation ended due to network problems. You can try connecting again clicking on:";
    this.conversationEndByConnText["pt-br"] = "A conversa foi finalizada por problemas de conexão. Se desejar pode tentar uma nova conexão pressionando:";
    
    this.reconnectButton["es-es"] = "Conectar";
    this.reconnectButton["ca-es"] = "Connectar";
    this.reconnectButton["en-en"] = "Connect";
    this.reconnectButton["pt-br"] = "Conectar";
    
    this.rcActivationEntryLabel["es-es"] = "Activando módulo de control remoto....";
    this.rcActivationEntryLabel["ca-es"] = "Activando módulo de control remoto....";
    this.rcActivationEntryLabel["en-en"] = "Activating remote control module...";
    this.rcActivationEntryLabel["pt-br"] = "Ativando módulo de controle remoto...";
    
    this.rcActivationInstructionsLabel["es-es"] = "Para continuar es necesario que instale el módulo de control remoto siguiendo los pasos indicados a continuación:";
    this.rcActivationInstructionsLabel["ca-es"] = "Para continuar es necesario que instale el módulo de control remoto siguiendo los pasos indicados a continuación:";
    this.rcActivationInstructionsLabel["en-en"] = "To continue is needed to install the remote control module following the next steps:";
    this.rcActivationInstructionsLabel["pt-br"] = "Para continuar é necessário que instale o módulo de controle remoto seguindo os passos indicados:";
    
    this.rcActivationInstructionsStep1Label["es-es"] = "1.- Sitúe el cursor sobre la barra amarilla que aparecerá en la parte superior de esta ventana.";
    this.rcActivationInstructionsStep1Label["ca-es"] = "1.- Sitúe el cursor sobre la barra amarilla que aparecerá en la parte superior de esta ventana.";
    this.rcActivationInstructionsStep1Label["en-en"] = "1.- Move the mouse cursor above the yellow bar that will appear on the top area of this window.";
    this.rcActivationInstructionsStep1Label["pt-br"] = "1 - Coloque o cursor sobre a barra amarela que aparecerá na parte superior da janela.";
    
    this.rcActivationInstructionsStep2Label["es-es"] = "2.- Pulse con el con el botón derecho del ratón sobre la barra para desplegar el menú de opciones.";
    this.rcActivationInstructionsStep2Label["ca-es"] = "2.- Pulse con el con el botón derecho del ratón sobre la barra para desplegar el menú de opciones.";
    this.rcActivationInstructionsStep2Label["en-en"] = "2.- Click this bar with the right mouse button in order to show the options menu.";
    this.rcActivationInstructionsStep2Label["pt-br"] = "2 - Pressione o botão direito do mouse sobre a barra para exibir o menú de opções.";
        
    this.rcActivationInstructionsStep3Label["es-es"] = "3.- Seleccione <strong>Instalar control active X</strong> y a continuación pulse <strong>Instalar</strong>.";
    this.rcActivationInstructionsStep3Label["ca-es"] = "3.- Seleccione <strong>Instalar control active X</strong> y a continuación pulse <strong>Instalar</strong>.";
    this.rcActivationInstructionsStep3Label["en-en"] = "3.- Select the option <strong>Install ActiveX control</strong> and then, click on <strong>Installl</strong>.";
    this.rcActivationInstructionsStep3Label["pt-br"] = "3 - Selecione <strong>Instalar control active X</strong> e pressione <strong>Instalar</strong> para continuar.";
    
	this.rcExeLinkMac["es-es"] = "Pulse en el siguiente enlace, se iniciará la descarga, una vez finalizada, abra el archivo y ejecútelo.<br/>";
	this.rcExeLinkMac["ca-es"] = "Pulse en el siguiente enlace, se iniciará la descarga, una vez finalizada, abra el archivo y ejecútelo.<br/>";
	this.rcExeLinkMac["en-en"] = "By clicking on the next link a download will start, once downloaded, open it and execute it.<br/>";
	this.rcExeLinkMac["pt-br"] = "Clique nesse texto, o arquivo será baixado, quando terminar de baixar, execute-o.<br/>";
	
    this.rcExePre["es-es"] = "Si tiene problemas para realizar la instalación automática, haga click en "; 
    this.rcExePre["ca-es"] = "Si tiene problemas para realizar la instalación automática, haga click en ";
    this.rcExePre["en-en"] = "If you have problems installing the remote control module, please, click on ";
    this.rcExePre["pt-br"] = "Se tiver algum problema para realizar a instalação automática acione o botão ";
    
    this.rcExeLink["es-es"] = "Ejecutar ahora";
    this.rcExeLink["ca-es"] = "Ejecutar ahora";
    this.rcExeLink["en-en"] = "Launch now";
    this.rcExeLink["pt-br"] = "Instalar agora";
    
    this.rcMacExplanation["es-es"] = "Cuando se le solicite introduzca el siguiente código de sesión: ";
    this.rcMacExplanation["ca-es"] = "Quan se li sol·liciti introdueixi el següent codi de sessió: ";
    this.rcMacExplanation["en-en"] = "When prompted enter the following session: ";
    this.rcMacExplanation["pt-br"] = "Quando solicitado entrar na sessão seguinte: ";  

    this.rcActivationInstallLabel["es-es"] = "Instalar ahora";
    this.rcActivationInstallLabel["ca-es"] = "Instal·lar ara";
    this.rcActivationInstallLabel["en-en"] = "Install now";
    this.rcActivationInstallLabel["pt-br"] = "Instalar agora";
    
    this.rcActivationExitLabel["es-es"] = "Salir y continuar";
    this.rcActivationExitLabel["ca-es"] = "Sortir i continuar";
    this.rcActivationExitLabel["en-en"] = "Exit and continue";     
    this.rcActivationExitLabel["pt-br"] = "Sair e continuar";
	
	this.rcExePost["es-es"] = " para descargar y ejecutar el archivo que dará comienzo a la sesión de control remoto.";
    this.rcExePost["ca-es"] = " para descargar y ejecutar el archivo que dará comienzo a la sesión de control remoto.";
    this.rcExePost["en-en"] = " in order to download and execute the software to begin the remote control session.";
	this.rcExePost["pt-br"] = " para baixar e executar o arquivo que dará início a seção de controle remoto.";

}
    
// Sets language
Language.prototype.setLanguage = function(langCode)
{
    if (langCode != null)
        this._langCode = langCode.toLowerCase();
}
    
// Returns traduced text for element
Language.prototype.getText = function(elementName)
{
    try
    {
        if (elementName == null)
            return "";
        
        elementName = "this." + elementName;
        
        if (eval(elementName) == null)
            return "";

        // If cannot find traduction, returns default language
        if (eval(elementName)[this._langCode] == null)
            return eval(elementName)[this._defaultCode];

        return eval(elementName)[this._langCode];
    }
    catch (exception)
    {
        return "";
    }
}
