Trifid plugin for i18n support
npm install lindas-trifid-plugin-i18nA Trifid plugin to add i18n support to Trifid.
Install this Trifid plugin using:
``sh`
npm install trifid-plugin-i18n
The plugin needs to be added to the Trifid config under the plugins property.locals
It should be loaded before the plugin and the template engine.locals
In the following example order 5 is used which works for the default config where the plugin uses a higher order value.config
The config for the i18n package can be set using the property.directory
The configuration field is required, and should point to the directory where you i18n JSON files are stored.index.js
See the i18n list of configuration options for more details.
Some default values are defined in the file.
Example of configuration:
`yaml``
plugins:
# […] your other plugins
i18n:
module: "trifid-plugin-i18n"
order: 5
config:
directory: file:locales
locales:
- en
- de
# …other configuration fields