@r3ps4j/i18next-fxserver-backend
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Introduction

npm version

This is a i18next backend plugin for FXServer. It will load resources from the files of the invoking resource using the LoadResourceFile native.

Getting started

Install the package via npm.

npm install @r3ps4j/i18next-fxserver-backend

To make use of the package, import it and load the backend as a module using i18next.use:

import i18next from "i18next";
import Backend from "@r3ps4j/i18next-fxserver-backend";

i18next.use(Backend).init(i18nextOptions);

Detector options

{
    // Path where resources get loaded from
    // Defaults to "/locales/{{lng}}/{{ns}}.json"
    loadPath: "/locales/{{lng}}/{{ns}}.json",
}

Options can be passed in by setting options.backend in i18next.init:

import i18next from "i18next";
import Backend from "@r3ps4j/i18next-fxserver-backend";

i18next.use(Backend).init({
    backend: options,
});

/@r3ps4j/i18next-fxserver-backend/

    Package Sidebar

    Install

    npm i @r3ps4j/i18next-fxserver-backend

    Weekly Downloads

    1

    Version

    1.0.0

    License

    LGPL-3.0-or-later

    Unpacked Size

    12.3 kB

    Total Files

    5

    Last publish

    Collaborators

    • r3ps4j