mirror of
https://github.com/tavo-wasd-gh/conex-builder.git
synced 2025-06-07 04:03:29 -06:00
dictionary
This commit is contained in:
parent
3c05df0f89
commit
4335a80488
4 changed files with 64 additions and 14 deletions
|
@ -1,4 +1,5 @@
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
loadLanguage('es');
|
||||||
const savedData = localStorage.getItem('conex_data');
|
const savedData = localStorage.getItem('conex_data');
|
||||||
if (savedData) {
|
if (savedData) {
|
||||||
const parsedData = JSON.parse(savedData);
|
const parsedData = JSON.parse(savedData);
|
||||||
|
@ -165,3 +166,23 @@ document.getElementById('imageUpload').addEventListener('change', function (even
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function loadLanguage(lang) {
|
||||||
|
fetch(`./lang/${lang}.json`)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(translations => {
|
||||||
|
// Find all elements with a 'data-translate' attribute
|
||||||
|
document.querySelectorAll('[data-translate]').forEach(element => {
|
||||||
|
const translationKey = element.getAttribute('data-translate');
|
||||||
|
|
||||||
|
// Check if the element is an input field (update placeholder)
|
||||||
|
if (element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea') {
|
||||||
|
element.placeholder = translations[translationKey];
|
||||||
|
} else {
|
||||||
|
// Update text content for non-input elements
|
||||||
|
element.innerText = translations[translationKey];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(error => console.error('Error loading language file:', error));
|
||||||
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
</label>
|
</label>
|
||||||
<img id="banner" name="banner" src="/static/svg/banner.svg" class="banner-image"/>
|
<img id="banner" name="banner" src="/static/svg/banner.svg" class="banner-image"/>
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
<input type="text" id="title" name="title" maxlength="35" class="input-title" placeholder="[Nombre Ejemplo]">
|
<input type="text" id="title" name="title" maxlength="35" class="input-title" data-translate="sampleTitle" placeholder="" >
|
||||||
<textarea type="text" id="slogan" name="slogan" maxlength="100" class="input-slogan" placeholder="[Slogan llamativo o breve descripción]"></textarea>
|
<textarea type="text" id="slogan" name="slogan" maxlength="100" class="input-slogan" data-translate="sampleSlogan" placeholder=""></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div id="status-popup" class="status-popup">
|
<div id="status-popup" class="status-popup">
|
||||||
<span class="close-popup" onclick="hidePopup()">×</span>
|
<span class="close-popup" onclick="hidePopup()">×</span>
|
||||||
|
@ -37,20 +37,20 @@
|
||||||
<div class="floating-buttons" id="floatingButtons">
|
<div class="floating-buttons" id="floatingButtons">
|
||||||
<button class="floating-button" id="openDialogButton">
|
<button class="floating-button" id="openDialogButton">
|
||||||
<img src="/static/svg/cart.svg">
|
<img src="/static/svg/cart.svg">
|
||||||
<span>$20/año</span>
|
<span data-translate="buyButton"></span>
|
||||||
</button>
|
</button>
|
||||||
<button class="floating-button" id="updateSiteButton">
|
<button class="floating-button" id="updateSiteButton">
|
||||||
<img src="/static/svg/edit.svg">
|
<img src="/static/svg/edit.svg">
|
||||||
<span>Editar mi página</span>
|
<span data-translate="editButton"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="dialog">
|
<div id="dialog">
|
||||||
<h2>Contratar por $20 al año</h2>
|
<h2 data-translate="checkoutHeader"></h2>
|
||||||
<p>Gracias por elegir nuestro servicio para la compra de sitios web. Luego de ser aprobado, su sitio será publicado en menos de 24 horas a partir de la confirmación de tu compra. Utilizaremos los medios de contacto que proporcione para comunicarnos en caso de cualquier inconveniente con la publicación. Si experimenta algún problema, no dude en ponerte en contacto con nosotros a través de los canales:</p>
|
<p data-translate="checkoutParagraph"></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Correo electrónico: soporte@conex.one</li>
|
<li data-translate="supportEmail"></li>
|
||||||
<!-- <li>Teléfono: +1 234 567 890</li> -->
|
<!-- <li data-translate="supportPhone"></li> -->
|
||||||
<li>Horario de atención: L-V: 9:00 a.m. - 6:00 p.m.</li>
|
<li data-translate="supportSchedule"></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="checkout-error-message"></div>
|
<div id="checkout-error-message"></div>
|
||||||
<div id="checkout-success-message"></div>
|
<div id="checkout-success-message"></div>
|
||||||
|
|
25
public/lang/es.json
Normal file
25
public/lang/es.json
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"buyButton": "Guardar",
|
||||||
|
"editButton": "Aplicar cambios",
|
||||||
|
"checkoutHeader": "Contratar por $20 al año",
|
||||||
|
"checkoutParagraph": "Gracias por elegir nuestro servicio para la compra de sitios web. Luego de ser aprobado, su sitio será publicado en menos de 24 horas a partir de la confirmación de tu compra. Utilizaremos los medios de contacto que proporcione para comunicarnos en caso de cualquier inconveniente con la publicación. Si experimenta algún problema, no dude en ponerte en contacto con nosotros a través de los canales:",
|
||||||
|
"supportEmail": "Correo electrónico: soporte@conex.one",
|
||||||
|
"supportPhone": "",
|
||||||
|
"supportSchedule": "Horario de atención: L-V: 9:00 a.m. - 6:00 p.m.",
|
||||||
|
"sampleTitle": "[Título de ejemplo]",
|
||||||
|
"sampleSlogan": "[Slogan o breve descripción]",
|
||||||
|
"sampleHeader": "Acerca de [Empres]",
|
||||||
|
"sampleParagraph": "En [Nombre de Tu Empresa], nos dedicamos a ofrecer [tu servicio/producto] de la más alta calidad con un servicio al cliente excepcional. Nuestro equipo de expertos se asegura de que cada aspecto de tu experiencia sea manejado con profesionalismo y cuidado.",
|
||||||
|
"sampleListItemOne": "Resolvemos una necesidad clave de mercado",
|
||||||
|
"sampleListItemTwo": "Inversión en crecimiento con presupuesto sostenible",
|
||||||
|
"sampleListItemThree": "Enfoque en satisfacción del cliente",
|
||||||
|
"sampleTable11": "Servicios",
|
||||||
|
"sampleTable12": "Descripción",
|
||||||
|
"sampleTable13": "Costo",
|
||||||
|
"sampleTable21": "Impresión",
|
||||||
|
"sampleTable22": "Breve descripción",
|
||||||
|
"sampleTable23": "1000",
|
||||||
|
"sampleTable31": "Laminado",
|
||||||
|
"sampleTable32": "Breve descripción",
|
||||||
|
"sampleTable33": "2000"
|
||||||
|
}
|
|
@ -1,22 +1,26 @@
|
||||||
BASE_URL="https://api-m.sandbox.paypal.com"
|
|
||||||
PORT="8080"
|
PORT="8080"
|
||||||
|
BASE_URL="https://api-m.sandbox.paypal.com"
|
||||||
CLIENT_ID=""
|
CLIENT_ID=""
|
||||||
CLIENT_SECRET=""
|
CLIENT_SECRET=""
|
||||||
RETURN_URL="http://localhost:8080/?success"
|
RETURN_URL="http://localhost:8080/?success"
|
||||||
CANCEL_URL="http://localhost:8080/?cancel"
|
CANCEL_URL="http://localhost:8080/?cancel"
|
||||||
|
|
||||||
DB_HOST="localhost"
|
DB_HOST="localhost"
|
||||||
DB_PORT="5432"
|
DB_PORT="5432"
|
||||||
DB_USER="conex"
|
DB_USER="conex"
|
||||||
DB_PASS="1234"
|
DB_PASS="1234"
|
||||||
DB_NAME="iterone"
|
DB_NAME="iterone"
|
||||||
|
BUCKET_NAME=""
|
||||||
|
BUCKET_ENDPOINT=""
|
||||||
|
BUCKET_ACCESSKEY=""
|
||||||
|
BUCKET_SECRETKEY=""
|
||||||
|
BUCKET_REGION="auto"
|
||||||
|
BUCKET_PUBLIC_ENDPOINT="https://r2.conex.one"
|
||||||
|
BUCKET_API_ENDPOINT=""
|
||||||
|
BUCKET_API_TOKEN=""
|
||||||
EMAIL_HOST=""
|
EMAIL_HOST=""
|
||||||
EMAIL_PORT="465"
|
EMAIL_PORT="465"
|
||||||
EMAIL_USER=""
|
EMAIL_USER=""
|
||||||
EMAIL_PASS=""
|
EMAIL_PASS=""
|
||||||
EMAIL_SUBJECT="Código temporal de CONEX Builder"
|
EMAIL_SUBJECT="Código temporal de CONEX Builder"
|
||||||
EMAIL_BODY="Su código temporal es: "
|
EMAIL_BODY="Su código temporal es: "
|
||||||
|
|
||||||
PRICE="20.00"
|
PRICE="20.00"
|
Loading…
Reference in a new issue