Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GlobalConfig] 支持动态切换多语言 #2468

Closed
duxphp opened this issue Aug 24, 2023 · 4 comments
Closed

[GlobalConfig] 支持动态切换多语言 #2468

duxphp opened this issue Aug 24, 2023 · 4 comments
Labels
enhancement New feature or request to be published fixed, not be published

Comments

@duxphp
Copy link
Contributor

duxphp commented Aug 24, 2023

tdesign-react 版本

最新版

重现链接

No response

重现步骤

使用ConfigProvider后在内部切换多语言配置,并没有热更新,需要刷新页面才会应用新语言

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

👋 @duxphp,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@HaixingOoO
Copy link
Collaborator

image
image

source code:
image
image

bug:
切換語言失敗,因為loadsh/merge導致上一源數據也跟著改變,導致引入的locale/zh_CN裡面的數據頁更正改變了

fix bug:
image
深度克隆語言來使用可以解決!!! @

@uyarn
Copy link
Collaborator

uyarn commented Aug 31, 2023

之前可能实现的时候没有考虑切换的场景 是得修复下

@uyarn uyarn added the enhancement New feature or request label Aug 31, 2023
@uyarn uyarn changed the title [GlobalConfig] 如何切换多语言 [GlobalConfig] 支持动态切换多语言 Aug 31, 2023
@uyarn uyarn added the to be published fixed, not be published label Sep 6, 2023
@uyarn
Copy link
Collaborator

uyarn commented Sep 14, 2023

supported in 1.2.5

@uyarn uyarn closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

3 participants