vue-i18n Questions

3

Is it possible to use vue, vue-i18n only with javascript (as an object), not in the template? in the src/boot/i18n.js import { boot } from 'quasar/wrappers' import { createI18n } from 'vue-i18n' im...
Asleep asked 24/10, 2022 at 15:10

9

I'm using i18n single file component to have translation support on my application. To do so, I'm using the tag as following <i18n> { "fr": { "text": "blabla in french blabla bla" }, ...
Doud asked 8/12, 2019 at 10:32

4

How can I call a function when the language/locale changes while using i18n? Should I use Vuex or does vue-i18n has a method that allows me to do that?
Nolannolana asked 17/4, 2021 at 17:52

10

trying to implement vue-i18n in a component with composition api. I want to be able to set some translation messages inside of the onMounted hook. In the options api, I would use this.$i18n.setLoca...
Daliladalis asked 8/9, 2021 at 12:56

2

I'm creating a Vue web component using vue-cli 4.5.13 and the --target wc option. I also need the component to use the vue-i18n-next plugin (last version for vue 3 projects), which requires some op...
Listerism asked 18/8, 2021 at 14:10

1

Solved

I've tried to configure Nuxt 3 along with the VueI18n plugin as described here. It works fine for "normal" translations using $t() within the template or using t() in the script part. I l...
Sunwise asked 28/3 at 20:55

2

I use nuxtjs and i18n to build a static website with multiple languages. At the moment I have one json file per language. For better structure i want to split the file in multiple files per languag...
Arching asked 19/2, 2018 at 7:2

2

Solved

I'm using Vue.js with vue-i18n to switch languages on my project without the need to refresh. However, when i want to switch between Arabic and anything else i need to change the website's design f...
Whitecollar asked 4/8, 2018 at 7:6

3

Solved

I am using vue-i18n in a Nuxtjs project, and I want to import my locale files with vite dynamicly. when I am using webpack, those code run well plugins/i18n.js import Vue from 'vue'; import VueI18n...
Johnsen asked 3/6, 2021 at 13:18

6

Solved

I am converting a VueJS project to Nuxt.js and I have a problem understanding how nuxt handles routing. Its documentation doesn't say anything about Pushing a route. Using VueJS I have the followi...
Fritter asked 16/5, 2018 at 15:52

3

Solved

I need to find a way to use the $t of i18n within the setup script for my vue project my i18n file looks like this: import { createI18n } from 'vue-i18n' import en from './en'; import es from './es...
Fernald asked 22/7, 2022 at 9:31

4

Solved

I'm using laravel-vue-i18n-generator package to handle text translation in vuejs component in my laravel project. I've set up app.js like below: import VueInternationalization from 'vue-i18n'; imp...
Reuven asked 29/5, 2019 at 7:53

4

Solved

I want to create a dynamical slider which depends on the page. security_signin: { slide1: 'Kitten1', slide2: 'Kitten2', }, signup: { slide1: 'Kitten1', slide2: 'Kitten2', slide3: 'Kitten3'...
Acrolith asked 15/9, 2018 at 12:40

2

Solved

I have a simple project codesandbox I use /vue-i18n Hello World template: <h1>{{msg}}</h1> And script: data() { return { msg: `{{ $t("welcomeMsg") }}` } } Plugins/i18n.js : ...
Rotogravure asked 27/10, 2019 at 16:33

6

I have started to replace Jest with Vitest for my unit test library in my Vue 3 App. I am trying to write unit test for a component that uses the vue-i18n library to translate text within it but wh...
Calkins asked 16/5, 2022 at 14:24

3

Solved

I'm creating a Vue web component using vue-cli 3 and the --target wc option. I also need the component to use the vue-i18n plugin, which requires some options to be passed to the main Vue instance ...
Var asked 16/11, 2018 at 15:58

2

Solved

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 trans...
Calle asked 18/11, 2021 at 8:50

2

I'm trying to add internationalization on my Vue.js project using Vue I18n. I'm using the documentation (i.e. http://kazupon.github.io/vue-i18n/guide/sfc.html#basic-usage), but I've got the follow...

10

I have created an ionic app and added vue-i18n. npx ionic start myapp tabs --type vue npm install vue-i18n@next I did the very first step of the VueI18n setup and added this to "./src/main.ts...
Fruity asked 10/2, 2021 at 16:0

2

I don't manage to get the locale parameter from vue-i18n in my child component. I've installed vue-i18n in cli ui. The translation with $t("message") is working but I have error when i try to acce...
Backsaw asked 29/1, 2019 at 18:8

2

Solved

I am using vue-i18n plugin for my Vue3(typescript) application. Below is my setup function in component code Home.vue import {useI18n} from 'vue-i18n' setup() { const {t} = useI18n() return { t ...
Preciousprecipice asked 24/2, 2021 at 9:48

6

Solved

Having issues incorporating vue-i18n into my app. Used this page as inspiration. <b-navbar-nav class="ml-auto" > <b-nav-item-dropdown :text="display_name" right> <b-dropdown-item...
Scorper asked 13/2, 2019 at 9:8

2

Solved

vue & vue-i18n version ex: vue: 3.0.0.0 vue-i18n: 9.0.0-beta.15 Description I am probably doing something very wrong, however I would really appreciate some direction. I followed documentati...
Knockknee asked 22/12, 2020 at 22:58

3

Getting a warning inside the console "[intlify] Detected HTML in .....", but can't figure out how to disable this warning for this specific line. I've also tried to change the eslintrc.js...
Saltern asked 1/11, 2021 at 10:50

3

Solved

Is there a way to check if translation exist? <p v-if="$t('some_key')">{{ $t('some_key') }}</p> In this case if there is no translation it will print 'some_key'. Maybe there ...
Newsman asked 26/6, 2020 at 16:57

© 2022 - 2024 — McMap. All rights reserved.