mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-29 21:11:51 +03:00
chore: small lang cleanup
This commit is contained in:
parent
886bc13f10
commit
5ad3ba201f
2 changed files with 5 additions and 1 deletions
|
@ -181,11 +181,13 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapGetters } from 'vuex'
|
import { mapState, mapGetters } from 'vuex'
|
||||||
import qbit from '@/services/qbit'
|
import qbit from '@/services/qbit'
|
||||||
|
import { availableLanguages } from '@/lang'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'General',
|
name: 'General',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
languages: ['en', 'es', 'fr', 'id', 'it', 'ja', 'nl', 'pt-br', 'vi', 'zh-hans', 'zh-hant'],
|
languages: availableLanguages,
|
||||||
paginationSizes: [5, 15, 30, 50],
|
paginationSizes: [5, 15, 30, 50],
|
||||||
titleOptions: ['Default', 'Global Speed', 'First Torrent Status'],
|
titleOptions: ['Default', 'Global Speed', 'First Torrent Status'],
|
||||||
Qbitversion: 0
|
Qbitversion: 0
|
||||||
|
|
|
@ -15,6 +15,8 @@ export const i18n = new VueI18n({
|
||||||
|
|
||||||
const loadedLanguages = ['en'] // our default language that is preloaded
|
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) {
|
function setI18nLanguage(lang) {
|
||||||
i18n.locale = lang
|
i18n.locale = lang
|
||||||
axios.defaults.headers.common['Accept-Language'] = lang
|
axios.defaults.headers.common['Accept-Language'] = lang
|
||||||
|
|
Loading…
Add table
Reference in a new issue