@grsmto/gatsby-plugin-i18next

1.1.9 • Public • Published

gatsby-plugin-i18next

Gatsby plugin that provides i18n support.

Installation

yarn add @grsmto/gatsby-plugin-i18next
# npm install --save @grsmto/gatsby-plugin-i18next

Usage

Edit gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `@grsmto/gatsby-plugin-i18next`,
      options: {
        // Add any options here
      },
    },
  ],
};

Options

You can pass options to the plugin:

  • availableLngs (Array [required])
  • fallbackLng (String [required])
  • siteUrl (String [optional])

For example:

options: {
  availableLngs: ['en', 'de'],
  fallbackLng: 'en',
  siteUrl: 'https://www.example.com/',
}

Starters

gatsby-starter-i18next

Demo Source

  • i18next integration
  • automatic browser-language detection and redirection
  • language switcher
  • hreflang
  • ...

License

MIT

Package Sidebar

Install

npm i @grsmto/gatsby-plugin-i18next

Weekly Downloads

1

Version

1.1.9

License

MIT

Unpacked Size

11 kB

Total Files

12

Last publish

Collaborators

  • gromy