From c1e4bfa90ffa26e203ca61717b4fb99209ad0d99 Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Sat, 25 Aug 2018 13:12:33 +0300 Subject: Make interface language configurable from settings The locale can now be configured in settings and is stored in Vuex. The changes are applied immidiately after selection. The list of languages is taken from the messages file, which contains all the available locales (and a new value, `interfaceLanguage`, to control the translation of this option in the options menu) Closes #36 --- src/App.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/App.js') diff --git a/src/App.js b/src/App.js index 39c97a80..a9a46fad 100644 --- a/src/App.js +++ b/src/App.js @@ -20,6 +20,10 @@ export default { data: () => ({ mobileActivePanel: 'timeline' }), + created () { + // Load the locale from the storage + this.$i18n.locale = this.$store.state.config.interfaceLanguage + }, computed: { currentUser () { return this.$store.state.users.currentUser }, background () { -- cgit v1.2.3-70-g09d2