Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
/ vue-i18next Public archive
forked from panter/vue-i18next

❗ This repository has been migrated into the official i18next organization: https://github.com/i18next/vue-i18next. This repository is deprecated.

License

Notifications You must be signed in to change notification settings

dot-base/vue-i18next

 
 

Repository files navigation

vue-i18next

Stripped-down version of the package described in https://panter.github.io/vue-i18next/

Introduction

This library is a simple wrapper for i18next, simplifying its use in Vue.

Initialisation

import Vue from "vue";
import i18next from "i18next";
import VueI18Next from "@dotbase/vue-i18next";
import App from "./App.vue";

Vue.use(VueI18Next, { i18next });

i18next.on("initialized", () => {
    new Vue({
        render: h => h(App),
    }).$mount("#app");
});

i18next.init({ ... });

Usage

Using the $t function, which works analogously to the t function found in i18next.

<i18n>
{
    "en": {
        "insurance": "Insurance"
    },
    "de": {
        "insurance": "Versicherung"
    }
}
</i18n>

<template>
    <span>{{ $t('insurance') }}</span>
</template>

Contributing

Requirements

  • node.js >= v15

About

❗ This repository has been migrated into the official i18next organization: https://github.com/i18next/vue-i18next. This repository is deprecated.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages

  • TypeScript 100.0%