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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user