Multilingual folder i18n contents are as follows:
src
lang
cn.js
us.js
index.js
The contents of the index.js file are as follows:
import VueI18n from 'vue-i18n'
import Vue from 'vue'
Vue.use(VueI18n)
const i18n = new…
Given a Laravel 5.5 project, I want to use the "single file component" of the vue-i18n plugin. Documentation. It seems simple, but I can't get it to work.
app.js
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n({
locale:…
I have a project built on vue which uses v-i18n to manage all the language and caption in a website.
All the languages are then stored into .js files
Situation
There will probably have a lot of changes to do over time.
Question
I'm wondering what…
I have a line of jQuery code:
$("#showNames").text("{{ $t('hide_labels') }}");
I'd like to set text of the #showNames element with the value taken from my vue-i18n instance, dependent on user localization. When it's written this way, I get the…
i got a little Problem, i'm creating a vuejs package in which i use vue-i18n to translate things.
The Problem is, if the user haven't got vue-i18n installed it breaks the package (obviously since i use it).
Do you know a way to prevent this?
My…
I have a main app using Nuxt2 and Vue. And I try to add a microfrontend using single-spa library. The subapp rendered in the main app without any errors but it is not displaying. I also use vue-i18n. Asynchronous functions in plugins section which…
I want to format my date-time outside the component.
function transformDatetime(config, value) {
if (value) {
return $d(new Date(value), config);
}
return $t('-');
}
I'm trying to get $t from the App instance. But it only works…
I've looked at the vue documentation on this page to see how I can solve this: https://kazupon.github.io/vue-i18n/guide/formatting.html#named-formatting
I think i have all the syntaxes correct and I have tried many different scenarios with the href…
My app is allowing users to redirect to another websites. If you try https://velas-deploy.herokuapp.com//example.com/ it will be redirected to example.com or any other website you want. Is there any way to disable it?
I'm using Nuxt + i18n.
What's the best approach in using VUE i18n for a long text paragraph?
I know that I can use backticks (``) and even preserve carriage return but is this the way to go? Or is better to conditionally load different JSON files according to the locale…
I want to get language data for i18n from database. I use session storage for save data then get data from API. But i18n created before session storage get data from database. How can I create session storage before create i18n?
i18n
store
call
I Have a vue2 project with vue-meta and i have vue-i18n to localize the project.
In my browser bookmark the title of the webpage is not shown. The variable is shown instead. Same issue when looking in google analytics it seems that my variable is…