-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Bug] 国际化配置默认语言为英文不生效 #12850
Comments
@zhangxinyong12 通过判断localStorage的值来手动默认是暂时方案,配置项不生效的Bug还是存在的。 |
你本来有一个 localStorage 的值是吧?你清空 localStorage 之后,配置就生效了。你有修改默认方案的时候,可以改一个 localStorage 的 key |
@xiaohuoni 是我描述过于繁琐了😂,这么说吧,localStorage没任何值的情况下,config里面配置的default值为英文不生效。 |
因为localStore取值不到getLocal的函数就返回了或运算的'zh-cn'。可以这么说 你本地初始化的情况下就是中文。因为代码就是默认中文。要么你就去改那个getLocal的函数本地缓存为空返回英文 |
那config里面提供default配置意义是什么? |
在.umirc.ts文件配置国际化默认英文,页面进去还是默认中文,需要调用setLocale手动切换英文,下次进页面才是英文。
清除掉localStorage的值后,再刷新还是默认中文。
The text was updated successfully, but these errors were encountered: