1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Implemented language switch in Interface Config Tab

This commit is contained in:
Simon
2018-03-06 15:04:04 +01:00
parent fe9afc8952
commit a36841e501
6 changed files with 106 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
import _ from 'lodash'
import RcParser from 'browser/lib/RcParser'
import i18n from 'browser/lib/i18n'
const OSX = global.process.platform === 'darwin'
const win = global.process.platform === 'win32'
@@ -132,6 +133,14 @@ function set (updates) {
document.body.setAttribute('data-theme', 'default')
}
if (newConfig.ui.language === 'en') {
i18n.setLocale('en')
} else if (newConfig.ui.language === 'de') {
i18n.setLocale('de')
} else {
i18n.setLocale('fr')
}
let editorTheme = document.getElementById('editorTheme')
if (editorTheme == null) {
editorTheme = document.createElement('link')