Update index.html
This commit is contained in:
+3
-11
@@ -17,19 +17,11 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const userLang = navigator.language || navigator.userLanguage;
|
||||
|
||||
// İçeriği dil tercihine göre yükleme
|
||||
// İçeriği dil tercihine göre yönlendirme
|
||||
if (userLang.startsWith('tr')) {
|
||||
fetch('/hometr.html')
|
||||
.then(response => response.text())
|
||||
.then(html => {
|
||||
document.documentElement.innerHTML = html; // Türkçe içeriği yükle
|
||||
});
|
||||
window.location.href = '/hometr.html'; // Türkçe içerik
|
||||
} else {
|
||||
fetch('/home.html')
|
||||
.then(response => response.text())
|
||||
.then(html => {
|
||||
document.documentElement.innerHTML = html; // İngilizce içeriği yükle
|
||||
});
|
||||
window.location.href = '/home.html'; // İngilizce içerik
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user