top of page
bottom of page
// Ejemplo de código para cambiar el idioma function cambiarIdioma(idioma) { if (idioma === 'es') { // Cambiar contenido al español $w('#titulo').text = '¡Bienvenido!'; $w('#contenido').text = 'Este es un ejemplo de cambio de idioma.'; } else if (idioma === 'en') { // Cambiar contenido al inglés $w('#titulo').text = 'Welcome!'; $w('#contenido').text = 'This is an example of language change.'; } // Establecer el atributo de idioma en la etiqueta html $w('html').lang = idioma; }