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