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

build-plugin-ice-i18n 使用非hooks方式设置语言 #5243

Closed
we6288815 opened this issue Mar 24, 2022 · 5 comments
Closed

build-plugin-ice-i18n 使用非hooks方式设置语言 #5243

we6288815 opened this issue Mar 24, 2022 · 5 comments
Assignees

Comments

@we6288815
Copy link

What is the current behavior? 发生了什么?

我需要在app.tsx的getInitialData方法中根据后台返回的多语言环境设置语言,但是插件提供的useLocale是个hooks,无法在app.tsx中直接使用,期望能提供非hooks方式设置语言。

image

Any additional comments? 相关环境信息?

  • ice.js Version:^2.0.0
  • build.json Configuration
  • Node Version:
  • Platform:
@we6288815
Copy link
Author

希望能提供非hooks的set和get方法,我还需要在request的响应拦截里提示多语言文本。

@luhc228
Copy link
Collaborator

luhc228 commented Mar 29, 2022

希望能提供非hooks的set和get方法,我还需要在request的响应拦截里提示多语言文本。

getLocale 已经有了的:https://ice.work/docs/guide/advanced/i18n#getlocale

setLocale 的 PR:#5253

@we6288815
Copy link
Author

getLocale 已经有了的:https://ice.work/docs/guide/advanced/i18n#getlocale
setLocale 的 PR:#5253

非常感谢

@we6288815
Copy link
Author

getLocale 已经有了的:https://ice.work/docs/guide/advanced/i18n#getlocale
setLocale 的 PR:#5253

非常感谢

1 similar comment
@we6288815
Copy link
Author

getLocale 已经有了的:https://ice.work/docs/guide/advanced/i18n#getlocale
setLocale 的 PR:#5253

非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants