Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

@arcblock/gatsby-i18n-redirect

Plugin to generate redirect page for i18n sites under public folder.

Install

npm install @arcblock/gatsby-i18n-redirect

Usage

In your gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: require.resolve('@arcblock/gatsby-i18n-redirect'),
      options: {
        languages: ['en', 'zh'],
        cookieName: 'nf_lang',
        pathPrefix: '/',
        forceRewrite: true
      },
    },
  ],
};
© 2023 Gatsby, Inc.