chore: small lang cleanup

This commit is contained in:
Daan Wijns 2022-04-17 15:46:44 +02:00
parent 886bc13f10
commit 5ad3ba201f
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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