js: dom lang switcher func