See what's launched

The next gen Gatsby is here Performance, developer velocity, and scaling to meet Enterprise needs - See what’s launched

Sign Up for Free
Community Plugin
View plugin on GitHub


Locale support for gatsby.

How to use

Install package

npm install --save gatsby-plugin-locale

Add a plugin to your gatsby-config.js

// In your gatsby-config.js
plugins: [
    resolve: `gatsby-plugin-locale`,
    options: {
      // language JSON resource path
      path: `${__dirname}/src/language`,
      // supported language
      languages: ["en", "fr"],
      // language file path
      defaultLanguage: "en",
      // option to redirect to `/en/` when connecting `/`
      redirect: true,
      // ignore paths for translations.
      ignoredPaths: [`/ignored-path`],
© 2022 Gatsby, Inc.