comparison src/site.js @ 91:76baf48ea36b

add translation
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 02 May 2025 17:17:52 -0600
parents
children
comparison
equal deleted inserted replaced
90:0dced626778b 91:76baf48ea36b
1 'use strict';
2
3 function setLanguage(lang) {
4 console.log(lang);
5 let path = location.pathname;
6 if( path.match(/^\/[a-z]{2}\//) )
7 path = path.substring(3);
8 if( lang !== 'en' )
9 path = "/" + lang + path;
10 location = path;
11 }