gatsby-plugin-locale
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

gatsby-plugin-locale

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`],
    },
  },
]

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    19
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    19
  • 0.3.3
    0

Package Sidebar

Install

npm i gatsby-plugin-locale

Weekly Downloads

19

Version

1.0.1

License

MIT

Unpacked Size

18.7 kB

Total Files

16

Last publish

Collaborators

  • haytherecharlie