Add German tutorial by Fischfilet and fix [Object object] bug in Player Settings page

This commit is contained in:
Chris Wilson
2020-09-25 23:57:16 -04:00
parent b08178a942
commit 26b75ca9df
5 changed files with 187 additions and 22 deletions

View File

@@ -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');