diff --git a/examples/basic/src/main.tsx b/examples/basic/src/main.tsx
index cbd8f349f..66f33af65 100644
--- a/examples/basic/src/main.tsx
+++ b/examples/basic/src/main.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useEffect } from 'react'
import ReactDOM from 'react-dom'
import {
Designer,
@@ -298,28 +298,37 @@ const Logo: React.FC = () => (
)
-const Actions = observer(() => (
-
- {
- GlobalRegistry.setDesignerLanguage(e.target.value)
- }}
- />
-
-
-
-
-))
+const Actions = observer(() => {
+ const supportLocales = ['zh-cn', 'en-us', 'ko-kr']
+ useEffect(() => {
+ if (!supportLocales.includes(GlobalRegistry.getDesignerLanguage())) {
+ GlobalRegistry.setDesignerLanguage('zh-cn')
+ }
+ }, [])
+
+ return (
+
+ {
+ GlobalRegistry.setDesignerLanguage(e.target.value)
+ }}
+ />
+
+
+
+
+ )
+})
const engine = createDesigner()
const App = () => {
diff --git a/examples/sandbox/src/main.tsx b/examples/sandbox/src/main.tsx
index bd7f325cf..f1267f192 100644
--- a/examples/sandbox/src/main.tsx
+++ b/examples/sandbox/src/main.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useEffect } from 'react'
import ReactDOM from 'react-dom'
import {
Designer,
@@ -297,28 +297,36 @@ const Logo: React.FC = () => (
)
-const Actions = observer(() => (
-
- {
- GlobalRegistry.setDesignerLanguage(e.target.value)
- }}
- />
-
-
-
-
-))
+const Actions = observer(() => {
+ const supportLocales = ['zh-cn', 'en-us', 'ko-kr']
+ useEffect(() => {
+ if (!supportLocales.includes(GlobalRegistry.getDesignerLanguage())) {
+ GlobalRegistry.setDesignerLanguage('zh-cn')
+ }
+ }, [])
+ return (
+
+ {
+ GlobalRegistry.setDesignerLanguage(e.target.value)
+ }}
+ />
+
+
+
+
+ )
+})
const engine = createDesigner()
const App = () => {
diff --git a/formily/antd/playground/widgets/ActionsWidget.tsx b/formily/antd/playground/widgets/ActionsWidget.tsx
index bb89688a8..dbfb55d35 100644
--- a/formily/antd/playground/widgets/ActionsWidget.tsx
+++ b/formily/antd/playground/widgets/ActionsWidget.tsx
@@ -11,6 +11,12 @@ export const ActionsWidget = observer(() => {
useEffect(() => {
loadInitialSchema(designer)
}, [])
+ const supportLocales = ['zh-cn', 'en-us', 'ko-kr']
+ useEffect(() => {
+ if (!supportLocales.includes(GlobalRegistry.getDesignerLanguage())) {
+ GlobalRegistry.setDesignerLanguage('zh-cn')
+ }
+ }, [])
return (