view website/src/site.js @ 2161:eb5bdf29a664 nginx_sites_addon tip

mkdir nginx_sites in update2.sh
author Violet7
date Wed, 28 Jan 2026 17:46:37 -0800
parents 31f006c64782
children
line wrap: on
line source

'use strict';

function setLanguage(lang) {
	console.log(lang);
	let path = location.pathname;
	if( path.match(/^\/[a-z]{2}\//) )
		path = path.substring(3);
	if( lang !== 'en' )
		path = "/" + lang + path;
	location = path;
}