Page 1 of 1

Hotspot Multi Language Login Page

Posted: Sun Jul 14, 2019 10:20 pm
by hrnrstgzl
Hi everyone. I'm newbee at mikrotik. I want to multilanguage login page in mikrotik hotspot which detect users device language.
I create html pages and I named them 'login_de', 'login_ru' etc.. And i write a java script code like this;
<script type="text/javascript">
var lang = navigator.language || navigator.userLanguage;
document.location.href = "../login_tr.html";
else if(lang.includes("de")){
document.location.href = "../login_de.html";
else if(lang.includes("ru")){
document.location.href = "../login_ru.html";
Script working and successfully redirecting other pages but when i write username and pasword and click login button its redirecting me to my default login page and my javascript code running again and redirecting me. I entering the deadcycle. But when i try to connect with default login.html page i can successfully login.
Note: I create other login page with copy-paste the default login page and editing them.