mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Add German tutorial by Fischfilet and fix [Object object] bug in Player Settings page
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const availableLanguages = {
|
||||
de: 'Deutsch',
|
||||
en: 'English',
|
||||
es: 'Español',
|
||||
fr: 'Français',
|
||||
@@ -25,7 +26,8 @@ window.addEventListener('load', () => {
|
||||
ajax.send();
|
||||
}).then((results) => {
|
||||
// Build the language selector
|
||||
const currentLanguage = window.location.href.split('/').pop();
|
||||
let currentLanguage = window.location.href.split('/').pop();
|
||||
if (Object.keys(availableLanguages).indexOf(currentLanguage) === -1) { currentLanguage = 'en' }
|
||||
const languageSelectorWrapper = document.createElement('div');
|
||||
languageSelectorWrapper.setAttribute('id', 'language-selector-wrapper')
|
||||
const languageSelector = document.createElement('select');
|
||||
|
Reference in New Issue
Block a user