I'm trying to unit test a simple component that uses translations with the vue-i18n module. Here are the files used:
src/i18n/index.ts
import { createI18n } from 'vue-i18n';
export function loadLanguages() {
const context =…
I'm using vue18n in my vue3 application.
For a specific component I would like to provide my template with the translation key dynamically.
So, I would like to use something like this:
I've two locale; "fa" and "en" with fa being default. I've tried to change it with the following code block both on nuxtServerInit and fetch hook of layout but it still revert back to my default locale and gives me json.parse error on route…
I am using Quasar v2, using the Vue Composition API and vue-i18n, and I would like the site title to change display when the active language changes (via a drop down), but whatever I am trying does not result in the title language being changed. Any…
In my home component I have the following:
const { location } = useLocation();
const { t, n } = useI18n();
const freeShippingValue = computed(() => {
return n(100, 'currency', location.value);
});
In my BaseMoney component I have:
const { n } =…
I am trying to build a multilingual Vue app with vue-i18n, and I am wondering how to persist the selected language? Anybody has experience with localisation? Is it possible by adding the language as a param to vue router? And or are there other ways…
I want to translate this sentence in i18n
Select branch(s) you want to send selected product
after selecting Branch Click on submit
As you can see , one word in above sentence is in tag.
I have this solution , But I am not sure is this…
I am new to vuejs and doing my project with multi language feature, German and English, but I have problem with data Array of String which is loops through of a lists, and I don't know how to translate it, here's what I meant
export default {
…
I'm using vue-i18n (version 8.24.2) in my app, and everything works as expected except when rendering dates using locale = nb-NO (Norwegian). Expected format: dd.MM.yyyy. Actual format: MM/dd/yyyy. When switching locale to German, which is using the…
In normal context, we just attach translation property to a variable like :
this.name = this.$t('language.name');
But I want to specific it in a specific language sometime( ex: in French).
Can we do something like this in vue.js ?
this.name =…
I am actually trying to follow this video tutorial : https://www.youtube.com/watch?v=CFGjn3yKMNc
Summary of the problem : I can't change the language dynamically with i18n. It stays on the language i18n was initialised with.
So, my i18n uses a…
Hi so if I use {{$t('dash.port')}} inside of template the translation happens and everything works fine.
Now I have an antdv table where i have columns declared this way :
const columns = [
{
title:"pone",
dataIndex: 'pone',
key:…
I am using Vue, and I want to show three languages. English, Tagalog and Cebuano.
Now I have the error
Cannot translate the value of keypath 'NavbarMobile.home'. Use the
value of keypath as default.
I checked if the plugin is working by…
I'm using the plugin vue-i18n for translations in a Nuxt.js-powered SPA. This allows easy access to messages within components, like this:
$t('footer.press')
But how do I get translations outside components? In my specific case, I need them in a…
I am using i18n library in Vue.js for language translation. I want to to import in it my script and store a value in data, but I have trouble with importing it. How should I import it? I tried with import $t from "./i18n"; but that just returns this…