mirror of
https://github.com/strapi/strapi.git
synced 2025-09-16 20:10:05 +00:00
Disable locales by default and remove useless configurations
This commit is contained in:
parent
fa39bcd988
commit
c59b16a38f
@ -6,20 +6,5 @@
|
|||||||
"path": "favicon.ico",
|
"path": "favicon.ico",
|
||||||
"maxAge": 86400000
|
"maxAge": 86400000
|
||||||
},
|
},
|
||||||
"prefix": "",
|
"prefix": ""
|
||||||
"jsonapi": {
|
|
||||||
"enabled": false,
|
|
||||||
"keyForAttribute": "dash-case",
|
|
||||||
"ignoreRelationshipData": true,
|
|
||||||
"includedRelationshipData": true,
|
|
||||||
"paginate": 10,
|
|
||||||
"showVersion": false
|
|
||||||
},
|
|
||||||
"graphql": {
|
|
||||||
"enabled": false,
|
|
||||||
"graphiql": false,
|
|
||||||
"pretty": true,
|
|
||||||
"usefulQueries": false,
|
|
||||||
"ignoreMutations": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"i18n": {
|
"i18n": {
|
||||||
|
"enabled": false,
|
||||||
"defaultLocale": "en_US",
|
"defaultLocale": "en_US",
|
||||||
"modes": [
|
"modes": [
|
||||||
"query",
|
"query",
|
||||||
|
@ -41,7 +41,7 @@ module.exports = strapi => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
initialize: cb => {
|
initialize: cb => {
|
||||||
if (_.isPlainObject(strapi.config.i18n) && !_.isEmpty(strapi.config.i18n)) {
|
if (_.isPlainObject(strapi.config.i18n) && !_.isEmpty(strapi.config.i18n) && _.get(strapi.config, 'i18n.enabled') !== false) {
|
||||||
strapi.middlewares.locale(strapi.app);
|
strapi.middlewares.locale(strapi.app);
|
||||||
strapi.app.use(strapi.middlewares.convert(strapi.middlewares.i18n(strapi.app, {
|
strapi.app.use(strapi.middlewares.convert(strapi.middlewares.i18n(strapi.app, {
|
||||||
directory: path.resolve(strapi.config.appPath, strapi.config.paths.config, 'locales'),
|
directory: path.resolve(strapi.config.appPath, strapi.config.paths.config, 'locales'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user