@deegital/vue-3-trustup-io-translations
Vue package that use i18n to translate on our app
7,608
| Install | |
|---|---|
npm install @deegital/vue-3-trustup-io-translations |
|
| Latest Version: | 0.0.28 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Feb 19, 2024 |
| Links: | npm |
Maintainer: axel_dev_trustup
vue-3-trustup-io-i18n 🈲
Installation
yarn add @deegital/vue-3-trustup-io-translations
Usage/ Exemples
In your main.ts
import { translationPlugin } from "./lib";
const app = createApp(App);
app.use(translationPlugin, { appName: import.meta.env.VITE_APP_NAME });
app.mount("#app");
It will return "Chantier"
<div class="text-2xl text-gray-600 font-thin">{{ $t("apps.worksite") }}</div>
You can use the composable and the plugin
<div>{{ $translator }}</div>
OR
import { useTranslation } from "./lib";
const translation = useTranslation();
useTranslate("key");
You can add translation from another app
useTranslation().addTranslationsByKey("worksite-admin");
You can add this script in your package.json to generate a translation file backup
"scripts": {
"generate": "translationIo generate && nuxt generate",
},
Development
./cli bootstrap #bootstrap project
./cli yarn install #install dependencies
./cli start #start project
./cli stop #stop project
./cli restart #restart project
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.28 | ^3.2.47 | MIT | |
| 0.0.27 | ^3.2.47 | MIT | |
| 0.0.26 | ^3.2.47 | MIT | |
| 0.0.24 | ^3.2.47 | MIT | |
| 0.0.23 | ^3.2.47 | MIT | |
| 0.0.22 | ^3.2.47 | MIT | |
| 0.0.21 | ^3.2.47 | MIT | |
| 0.0.20 | ^3.2.47 | MIT | |
| 0.0.18 | ^3.2.47 | MIT | |
| 0.0.17 | ^3.2.47 | MIT | |
| 0.0.16 | ^3.2.47 | MIT | |
| 0.0.15 | ^3.2.47 | MIT | |
| 0.0.14 | ^3.2.47 | MIT | |
| 0.0.13 | ^3.2.47 | MIT | |
| 0.0.12 | ^3.2.47 | MIT | |
| 0.0.2 | ^3.2.47 | MIT |