GithubHelp home page GithubHelp logo

trifid-plugin-i18n's Introduction

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 middlewares property. It should be loaded before the locals middleware and the template engine. In the following example order 5 is used which works for the default config where the locals middleware 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:

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

trifid-plugin-i18n's People

Contributors

ludovicm67 avatar bergos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.