@nocobase/server 0.7.0-alpha.62 → 0.7.0-alpha.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/helper.js +1 -1
  2. package/package.json +6 -6
package/lib/helper.js CHANGED
@@ -117,7 +117,7 @@ function registerMiddlewares(app, options) {
117
117
  });
118
118
  ctx.i18n = i18n;
119
119
  ctx.t = i18n.t.bind(i18n);
120
- const lng = ctx.request.query.locale || ctx.acceptsLanguages().shift();
120
+ const lng = ctx.get('X-Locale') || ctx.request.query.locale || ctx.acceptsLanguages().shift() || 'en-US';
121
121
 
122
122
  if (lng !== '*' && lng) {
123
123
  i18n.changeLanguage(lng);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "0.7.0-alpha.62",
3
+ "version": "0.7.0-alpha.63",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -13,10 +13,10 @@
13
13
  "dependencies": {
14
14
  "@koa/cors": "^3.1.0",
15
15
  "@koa/router": "^9.4.0",
16
- "@nocobase/acl": "0.7.0-alpha.62",
17
- "@nocobase/actions": "0.7.0-alpha.62",
18
- "@nocobase/database": "0.7.0-alpha.62",
19
- "@nocobase/resourcer": "0.7.0-alpha.62",
16
+ "@nocobase/acl": "0.7.0-alpha.63",
17
+ "@nocobase/actions": "0.7.0-alpha.63",
18
+ "@nocobase/database": "0.7.0-alpha.63",
19
+ "@nocobase/resourcer": "0.7.0-alpha.63",
20
20
  "chalk": "^4.1.1",
21
21
  "commander": "^9.2.0",
22
22
  "find-package-json": "^1.2.0",
@@ -26,5 +26,5 @@
26
26
  "koa-static": "^5.0.0",
27
27
  "lodash": "^4.17.21"
28
28
  },
29
- "gitHead": "76921b23d704ebcb8d736cb8b93c89b781674acd"
29
+ "gitHead": "c01c6952a58c2677d9f45fb41872363afda25197"
30
30
  }