feat: add Polish, Dutch and Portuguese translations

This commit is contained in:
kolaente 2022-02-12 23:49:34 +01:00
parent 8b90b8f6a8
commit 80664b6182
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -1,4 +1,4 @@
import { createI18n } from 'vue-i18n' import {createI18n} from 'vue-i18n'
import langEN from './lang/en.json' import langEN from './lang/en.json'
export const i18n = createI18n({ export const i18n = createI18n({
@ -19,6 +19,9 @@ export const availableLanguages = {
'vi-VN': 'Tiếng Việt', 'vi-VN': 'Tiếng Việt',
'it-IT': 'Italiano', 'it-IT': 'Italiano',
'cs-CZ': 'Čeština', 'cs-CZ': 'Čeština',
'pl-PL': 'Polski',
'nl-NL': 'Nederlands',
'pt-PT': 'Português',
} }
const loadedLanguages = ['en'] // our default language that is preloaded const loadedLanguages = ['en'] // our default language that is preloaded
@ -30,10 +33,10 @@ const setI18nLanguage = lang => {
} }
export const loadLanguageAsync = lang => { export const loadLanguageAsync = lang => {
if(!lang) { if (!lang) {
return return
} }
if ( if (
// If the same language // If the same language
i18n.global.locale === lang || i18n.global.locale === lang ||