I'm actually working on an nativescript mobile app with vuejs (android app).
I would like use an i18n module in my app but I don't find any Nativescript and Vuejs tutorial to do it.
I have already try some similar tutorials but without success...
Anyone have a tutorial for this issue or some advices to help me ? Or explain me why my request isn't consistent.
Thx for advance !
-
If you have tried using i18n the way it is described for Vue.js apps in plugin documentation, please include code samples of such attempt and issues you have encountered.aBiscuit– aBiscuit2019-02-28 10:41:37 +00:00Commented Feb 28, 2019 at 10:41
-
This type of advice requests are more welcomed in the #vue channel of NativeScript community slack.Tiago A.– Tiago A.2019-02-28 11:20:02 +00:00Commented Feb 28, 2019 at 11:20
Add a comment
|
2 Answers
There is nothing specific about using an i18n package with NativeScript-Vue. For instance, I am using vue-i18next in my NativeScript-Vue project.
Comments
While vue-i18next is more Vue way of doing it on Web, if you prefer a native mobile solution, you might be interested in nativescript-localize plugin.
JS
import { localize } from "nativescript-localize";
Vue.filter("L", localize);
Tempalte
<Label :text="'Hello world !'|L"></Label>
<Label :text="'I am %s'|L('user name')"></Label>