view website/src/site.js @ 2031:14a690642b88 default tip

Correct redirection syntax in backup/start.sh
author Violet7
date Sat, 01 Nov 2025 22:27:03 -0700
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;
}