view website/src/site.js @ 1943:763e8e77c468 default tip

swing
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 19 May 2025 17:19:23 -0600
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;
}