MCPcopy Create free account
hub / github.com/esengine/esengine / handleLocaleChange

Function handleLocaleChange

packages/editor-app/src/App.tsx:1036–1048  ·  view source on GitHub ↗
(newLocale: Locale)

Source from the content-addressed store, hash-verified

1034 };
1035
1036 const handleLocaleChange = (newLocale: Locale) => {
1037 changeLocale(newLocale);
1038
1039 // 通知所有已加载的插件更新语言 | Notify all loaded plugins to update locale
1040 if (pluginManagerRef.current) {
1041 pluginManagerRef.current.setLocale(newLocale);
1042
1043 // 通过 MessageHub 通知需要重新获取节点模板 | Notify via MessageHub to refetch node templates
1044 if (messageHubRef.current) {
1045 messageHubRef.current.publish('locale:changed', { locale: newLocale });
1046 }
1047 }
1048 };
1049
1050 const handleToggleDevtools = async () => {
1051 try {

Callers

nothing calls this directly

Calls 2

setLocaleMethod · 0.65
publishMethod · 0.65

Tested by

no test coverage detected