Skip to content

Commit

Permalink
chore: small lang cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
WDaan committed Apr 17, 2022
1 parent 886bc13 commit 5ad3ba2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -181,11 +181,13 @@
<script>
import { mapState, mapGetters } from 'vuex'
import qbit from '@/services/qbit'
import { availableLanguages } from '@/lang'
export default {
name: 'General',
data() {
return {
languages: ['en', 'es', 'fr', 'id', 'it', 'ja', 'nl', 'pt-br', 'vi', 'zh-hans', 'zh-hant'],
languages: availableLanguages,
paginationSizes: [5, 15, 30, 50],
titleOptions: ['Default', 'Global Speed', 'First Torrent Status'],
Qbitversion: 0
Expand Down
2 changes: 2 additions & 0 deletions src/lang/index.js
Expand Up @@ -15,6 +15,8 @@ export const i18n = new VueI18n({

const loadedLanguages = ['en'] // our default language that is preloaded

export const availableLanguages = ['en', 'es', 'fr', 'id', 'it', 'ja', 'nl', 'pt-br', 'vi', 'zh-hans', 'zh-hant']

function setI18nLanguage(lang) {
i18n.locale = lang
axios.defaults.headers.common['Accept-Language'] = lang
Expand Down

0 comments on commit 5ad3ba2

Please sign in to comment.