Community discussions

 
User avatar
hrnrstgzl
just joined
Topic Author
Posts: 1
Joined: Sun Jul 14, 2019 9:19 pm
Location: Turkey

Hotspot Multi Language Login Page

Sun Jul 14, 2019 10:20 pm

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;
if(lang.includes("tr")){
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>
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.

Who is online

Users browsing this forum: No registered users and 30 guests