mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-28 09:21:16 -07:00
Integrate gatsby-plugin-intl for internationalization Replaces static text with `intl.formatMessage` call and Links with `gatsby-plugin-intl` equivalent Note: `npm install` now requires `--force` to install the latest `gatsby-plugin-intl` as it doesn't explicitly support gatsby3.0
This commit is contained in:
parent
5c3a3c022a
commit
a579cb13bf
10 changed files with 2475 additions and 1290 deletions
|
@ -12,14 +12,29 @@ module.exports = {
|
|||
siteMetadata: {
|
||||
title: "Justice40",
|
||||
},
|
||||
plugins: [{
|
||||
resolve: 'gatsby-plugin-sass',
|
||||
options: {
|
||||
cssLoaderOptions: {
|
||||
modules: {
|
||||
exportLocalsConvention: 'camelCaseOnly'
|
||||
plugins: [
|
||||
{
|
||||
resolve: 'gatsby-plugin-sass',
|
||||
options: {
|
||||
cssLoaderOptions: {
|
||||
modules: {
|
||||
exportLocalsConvention: 'camelCaseOnly'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},],
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-intl`,
|
||||
options: {
|
||||
// language JSON resource path
|
||||
path: `${__dirname}/src/intl`,
|
||||
// supported language
|
||||
languages: [`en`, `es`],
|
||||
// language file path
|
||||
defaultLanguage: `en`,
|
||||
// option to redirect to `/en` when connecting `/`
|
||||
redirect: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue