var setting = new Array(); setting.siteRootUrl = "http://webdir.es"; setting.siteDescriptionMaxLength = 400; setting.siteDescriptionMinLength = 100; setting.maxKeywordsCountPerSite = 5; setting.itemGalleryImagesMaxCount = 5; setting.metaDataUrl = "/webmaster/getMetaData"; setting.urlMandatory = 0; setting.backLinkMandatory = 0; setting.urlRewriting = 1; setting.lang = new Array(); setting.lang['You have already added this keyword. Select another one.'] = "Ya ha elegido esta palabra clave. Seleccione otra"; setting.lang['loading...'] = "Cargando..."; setting.lang['Please, fill in the fields URL of site, Title and Description.'] = "Por favor, rellene los campos URL del sitio web, título y descripción "; setting.lang['The URL must start with http://'] = "La dirección URL debe comenzar con http://"; setting.lang['Please, enter a valid e-mail address.'] = "Por favor escriba una direccion de E-mail valida"; setting.lang['You modify the webmaster of this site. Do you want the fields Webmaster Email and Webmaster Name to be refreshed, or you want to modify them manually?'] = "Al cambiar el webmaster sitio web, el e-mail también cambiará"; setting.lang['The comment was saved.'] = "El comentario ha sido guardado"; setting.lang['The comment was deleted.'] = "El comentario ha sido borrado"; setting.lang['The IP was banned.'] = "la IP ha sido baneada"; setting.lang['Please, select a package.'] = "Por favor seleccione un paquete"; setting.lang['Please, select a payment processor.'] = "Por favor, seleccione un procesador de pagos"; setting.lang['Please, enter a name or nickname.'] = "Por favor introduzca su nombre de usuario"; setting.lang['Please, enter a comment.'] = "Please, enter a comment."; setting.lang['Please, enter the protection code.'] = "Por favor introduzca el codigo de seguridad"; setting.lang['The tag was saved.'] = "La etiqueta se guardó"; setting.lang['You can`t select this payment method for selected package.'] = "Usted no puede seleccionar este metodo de pago para el paquete seleccionado"; setting.lang["Delete"] = "Borrar"; setting.lang["Edit"] = "javascriptConfig_edit"; setting.lang["File"] = "Archivo"; setting.lang["was uploaded sucessfully"] = "Se ha subido correctamente"; setting.lang["of"] = "de"; setting.lang["available photos uploaded"] = "Fotos subidas dispobibles"; setting.lang["Loading"] = "Cargando"; setting.lang["Loading..."] = "Cargando..."; setting.lang["Your email must be in format - name@domain.com"] = "Su E-mail debe tener el siguiente formato - nombre@dominio.com"; setting.lang["Email was used earlier"] = "Este correo ya fue usado"; setting.lang["Please enter password"] = "Por favor escriba su contraseña"; setting.lang["Please confirm your password"] = "Por favor confirme su contraseña"; setting.lang["Please enter captcha code"] = "Por favor escriba el codigo antispam"; setting.lang["Passwords aren't equal"] = "Sus contraseñas no coinciden"; setting.lang["This field is required"] = "Este campo es requerido"; setting.lang["Please enter your email"] = "Por favor escriba su E-mail"; setting.lang["Validation message"] = "javascript_config_validation_message"; setting.lang["Your message was saved"] = "javascript_config_your_message_was_saved"; setting.lang["Your message was sent"] = "javascript_config_your_message_was_sent"; setting.lang["New file has been uploaded sucessfully"] = "javascript_config_new_file_has_been_uploaded_sucessfully"; setting.lang["Uploading..."] = "javascript_config_uploading"; setting.lang["You have entered an invalid code"] = "javascript_config_you_have_entered_an_invalid_code"; function _t($phrase) { return setting.lang[$phrase] || $phrase; } var AppRouter = { rewrites: new Array(), addRewriteRule: function(pattern, replacement) { AppRouter.rewrites.push({"pattern": new RegExp(pattern), replacement: replacement}); }, getRewrittedUrl: function(url) { var rewrittedUrl = setting.siteRootUrl; if(!setting.urlRewriting)rewrittedUrl += "/index.php"; for(var i = 0; i < AppRouter.rewrites.length; i++) { var rewrite = AppRouter.rewrites[i]; url = url.replace(rewrite.pattern, rewrite.replacement); } rewrittedUrl += url; return rewrittedUrl; } }