vue-i18n | : globe_with_meridians : Internationalization plugin | Plugin library
kandi X-RAY | vue-i18n Summary
kandi X-RAY | vue-i18n Summary
:globe_with_meridians: Internationalization plugin for Vue.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Escapes HTML properties for rendering .
- Escape text for HTML .
- Formats a sub - path path as a prefix
- load all story - feeds
- simple closure function
- the integrator function
- super . mixin
- creates a new array - like function
- Removes a value from t .
- Calculate the page location
vue-i18n Key Features
vue-i18n Examples and Code Snippets
Community Discussions
Trending Discussions on vue-i18n
QUESTION
I'm doing multi-language support with vue js, everything works fine, but when I change the language, the data in the data menuItem name does not change.
...ANSWER
Answered 2022-Apr-05 at 11:40data() is only called once when creating the component, and it's not intended to be reactive. (So basically when your component is being created, it gets the your current translation as initial values)
To make a property reactive on $t(), you should use computed var instead:
QUESTION
I'm right now doing a frontend interface in vueJS, and i'm currently working with vuejs 3 and i18n. The implementation of i18n works quite fine the normal way but when I want to use it with the composition API starts the problems.
So what I did. My main.js looks like this:
...ANSWER
Answered 2022-Mar-16 at 06:23You already instantiated i18n
on your app, in main.js
. That's the important bit.
The example presented in docs doesn't necessarily have to be done on the instance defined inside createApp
. It works in any component, as long as you have instantiated i18n on main.(js|ts)
This will work in any component (wherever you need t
):
QUESTION
I have an app used globally and my company is in the process of rebranding itself for some markets.
For example in the U.S. and Canada we are known as "Acme Company", but now we want to be known as "Acme Company" in the U.S. and as "Foo Company in Canada.
Currently our vue-18n translation files are littered with "Acme Company" inside the translations, for example:
...ANSWER
Answered 2022-Mar-15 at 16:27If you need custom behaviour, it's preferable to use custom functions that suit it instead of shimming third-party library that shouldn't be aware of your case.
vue-i18n functions have variadic arguments, some signatures can be discarded for the ease of the implementation. It's cleaner to use another function name to not interfere with library names, but they could be replaced for a drop-in replacement:
QUESTION
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 ?
...ANSWER
Answered 2022-Feb-25 at 20:05Each time you change/set the locale you need to store its value in the localStorage. Add this to your App:
QUESTION
I use vue-i18n in my application. Now I would like to add an "About" view with a lot text and links.
I think it would be better maintainable to have several language dependent views than adding several {{ $t(...)}}
in one view about.vue
.
I thought about something like adding language ISO code to the view name:
- .../about.en.vue
- .../about.de.vue
- .../about.es.vue
What would be the best way to combine and integrate with vue-i18n? Probably there is a different way?
...ANSWER
Answered 2021-Dec-07 at 16:51You can use a dynamic component to achieve this:
QUESTION
i have this url in tempalte but it doesn't works:
...ANSWER
Answered 2022-Feb-24 at 13:58The variable name should be $i18n
.
QUESTION
In a fresh Laravel 9 installation, the URL processing from Laravel Mix does not work anymore.
npm outputs the following:
...ANSWER
Answered 2022-Feb-22 at 10:55Actually moving the css imports into resources/js/app.js
solves this problem. However, this results in the imported css to be included in the public/js/app.js
, not the public/css/app.css
.
QUESTION
The build with Vite and Vue works like a charm (so ist the path correct). However, it does not with storybook.
Here my config:
vite.config.js
...ANSWER
Answered 2022-Feb-19 at 21:45I have had exactly the same problem. Although many vite vue 3 boilerplates do it the same way you and I do, strangely it didn't work, maybe it's a certain vite version that might have bugs.
The only thing that worked for me was the import in main.ts
:
QUESTION
all! This is the first time I apply vue-i18n
in my typeScript + Vue
project. As the official site guided, I install it by using yarn install vue-i18n
, then I want import it in main.ts
via import VueI18n from 'vue-i18n'
, and it shows error below. Why this would happen and how could I fix it? Thanks in advance.
ANSWER
Answered 2022-Feb-10 at 16:10Have you tried to copy the route just like this (I use Vscode) and then paste it in the import part to guarantee there are no mistakes in the route?
Also you can try with this import import { VueI18n } from "/Users/scott/Desktop/Pando/uikit-main/node_modules/vue-i18n/dist/vue-i18n" instead VueI18n from 'vue-i18n'
QUESTION
I am very new to Vue and I am trying to set up vue-i18n
and continue to get console warnings
ANSWER
Answered 2022-Jan-26 at 14:09The meaning of this warning message is that you need to specify the flag explicitly in the bundler when you do a production build.
Please refer to the following link for packages provided by vue-i18n for bundlers.
https://vue-i18n.intlify.dev/installation.html#with-a-bundler
One advice to help you out is to use the plugins for each bundler listed in the NOTE section of the above link, and they will configure them properly for you. I recommend that you check them out.
Checkout this issue listed in GitHub forum.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vue-i18n
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page