Implement language switcher functionality and enhance localization support: add available locales configuration, update SetLocale middleware to handle language selection via query parameters, and integrate language switcher buttons in the settings layout. Additionally, update various views to utilize translation functions for improved internationalization, ensuring consistent language support across the application.
This commit is contained in:
@@ -492,6 +492,15 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Language Switcher
|
||||
$('#language-switcher button').on('click', function (e) {
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
var lang = $(this).attr('data-lang');
|
||||
var currentUrl = new URL(window.location.href);
|
||||
currentUrl.searchParams.set('lang', lang);
|
||||
window.location.href = currentUrl.toString();
|
||||
});
|
||||
|
||||
///============= * Custom Cursor =============\\\
|
||||
var ball = document.getElementById("cursor-ball");
|
||||
var cursorText = document.getElementById("cursor-text");
|
||||
|
||||
Reference in New Issue
Block a user