// Used both on index and variant page, to switch language
function setLanguage(e)
{
- console.log(e);
setCookie("lang", e.target.value);
location.reload(); //to include the right .pug file
}
{
document.getElementById(elemId).click(); //or ".checked = true"
}
+
+function translate(msg)
+{
+ return translations[msg];
+}