This commit is contained in:
simio 2025-05-07 17:23:16 -03:00
parent 42e1a65b43
commit 5953a14893
2 changed files with 9 additions and 7 deletions

View File

@ -3,7 +3,7 @@ const appDir = dirname(require.main.filename);
const fs = require('fs')
const langs = ["es", "en"]
function createCommonPath(router, path, renderParams = {
async function createCommonPath(router, path, renderParams = {
}, cb = () => {}){
const defaultParams = {
view: path,
@ -30,11 +30,13 @@ function createCommonPath(router, path, renderParams = {
}
}
renderOptions.lang = "es"
createPath('/' + path, cb, renderOptions, router)
langs.forEach(l => {
renderOptions.lang = l
createPath('/' + l + "/" + path, cb, renderOptions, router)
})
renderOptions.langPath = ""
await createPath('/' + path, cb, renderOptions, router)
// for(let l in langs){
// renderOptions.lang = l
// renderOptions.langPath = l + '/'
// await createPath('/' + renderOptions.langPath + path, cb, renderOptions, router)
// }
}
async function createPath(path, cb, renderOptions, router){

View File

@ -2,7 +2,7 @@
<center id="top" height="4" class="main_div">
<br>
<br>
<marquee>Puede que esta red deje de andar por https cada 30 minutos. En su lugar, usa <a href="http://lyricaltokarev.com">http</a></marquee>
<marquee>Puede que esta red deje de andar por https cada 30 minutos. En su lugar, usa <a href="http://lyricaltokarev.com/{{langPath}}home">http</a></marquee>
<table class="tabidachi_table" cellspacing="20" cellmargin="60" width="100%">
<tbody>
<tr>