0.6.3 • Published 3 years ago

@fatal-insomnia/vue-i18next v0.6.3

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

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 "@fatal-insomnia/vue-i18next";

Vue.use(VueI18Next);

i18next.init({
    lng: "de",
    resources: { ... }
});

new Vue({ ... });

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>
0.6.3

3 years ago

0.6.2

3 years ago

0.6.0

3 years ago