aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
authorEkaterina Vaartis <vaartis@cock.li>2018-08-25 13:12:33 +0300
committerEkaterina Vaartis <vaartis@cock.li>2018-08-25 13:29:49 +0300
commitc1e4bfa90ffa26e203ca61717b4fb99209ad0d99 (patch)
tree39a63cb4156cd08bcf960cff51be2de09c1d6af8 /src/App.js
parent30a6b7be5bf53611bb65cbabd18ad003989df8e3 (diff)
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
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js4
1 files changed, 4 insertions, 0 deletions
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 () {