1.0.0 • Published 9 months ago

@r3ps4j/i18next-fxserver-backend v1.0.0

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
github
Last release
9 months ago

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,
});
1.0.0

9 months ago