trifid-plugin-i18n

3.0.1 • Public • Published

trifid-plugin-i18n

A Trifid plugin to add i18n support to Trifid.

Usage

Install this Trifid plugin using:

npm install trifid-plugin-i18n

The plugin needs to be added to the Trifid config under the plugins property. It should be loaded before the locals plugin and the template engine. In the following example order 5 is used which works for the default config where the locals plugin uses a higher order value. The config for the i18n package can be set using the config property. The directory configuration field is required, and should point to the directory where you i18n JSON files are stored. See the i18n list of configuration options for more details. Some default values are defined in the index.js file.

Example of configuration:

plugins:
  # […] your other plugins
  i18n:
    module: "trifid-plugin-i18n"
    order: 5
    config:
      directory: file:locales
      locales:
        - en
        - de
      # …other configuration fields

Readme

Keywords

none

Package Sidebar

Install

npm i trifid-plugin-i18n

Weekly Downloads

40

Version

3.0.1

License

MIT

Unpacked Size

8.72 kB

Total Files

7

Last publish

Collaborators

  • ludovicm67
  • zazuko-bot