@alxshelepenok/gatsby-plugin-i18next

Gatsby plugin that provides i18n support

Usage no npm install needed!

<script type="module">
  import alxshelepenokGatsbyPluginI18next from 'https://cdn.skypack.dev/@alxshelepenok/gatsby-plugin-i18next';
</script>

README

gatsby-plugin-i18next

Gatsby plugin that provides i18n support.

Installation

yarn add @alxshelepenok/gatsby-plugin-i18next

Usage

Edit gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `@alxshelepenok/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/',
}

License

MIT