🐛[BUG] Layout:false does not inject locale into components
See original GitHub issue🐛 bug 描述
In routes.ts
when layout:false
the locale is not injected into ANTD Pro Components.
📷 复现步骤 Steps to reproduce
Observe here: https://preview.pro.ant.design/user/login/ the Login button remains in Chinese even if language is changed.
🏞 期望结果 Expected results
The button language should change.
💻 复现代码 Reproduce the code
If we have
(pay attention to layout:false
)
{
path: '/user',
routes: [
{
path: '/user/login',
layout: false,
name: 'login',
component: './user/Login',
},
...
The locale
is ‘default’ which is just Chinese.
If we have layout:true
{
path: '/user',
routes: [
{
path: '/user/login',
layout: true,
name: 'login',
component: './user/Login',
},
...
© 版本信息
- Ant Design Pro 版本: 5
- umi 版本 3.5.2
- 浏览器环境
- 开发环境 Windows 10
🚑 其他信息
Issue #9179
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Layouts and Rendering in Rails - Ruby on Rails Guides
Layouts and Rendering in Rails. This guide covers the basic layout features of Action Controller and Action View. After reading this guide, you...
Read more >Get current locale in a child component - vue.js - Stack Overflow
I've installed vue-i18n in cli ui. The translation with $t("message") is working but I have error when i try to access to i18n.locale....
Read more >Bugzilla for localizers - Documentation for Mozilla localizers
Triage localization bugs. Follow the Bugzilla component for your locale; Saved searches; Confirm and close bugs. Bugzilla is the system used to track...
Read more >The Ultimate Guide to Angular Localization | Phrase
It's no surprise that Angular has robust built-in i18n support. ... Add to cart ... How do I configure the supported locales in...
Read more >I18n with Storybook - JS.ORG
Let's use i18next to extend Storybook with a locale switcher in the toolbar to choose which locale is shared with your components. Follow...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Completely agree, I just posted the workaround. It would be great if this can be reopen and properly fixed
Good to know. But this more of a hack then a solution. The behaviours logic is hidden. It should be done in the demo to demonstrate.