Closed lobosan closed 7 years ago
I think the document is very clear. https://ant.design/components/locale-provider
import esES from 'antd/lib/locale-provider/en_US';
<LocaleProvider locale={esES}>
<App />
</LocaleProvider>
Hi @paranoidjk I mentioned this because I've been following the dva examples and there's no <App />
but instead src/router.js
where I'm importing the locale provider and returning the router as follows:
import {LocaleProvider} from 'antd';
import enUS from 'antd/lib/locale-provider/en_US';
...
return (
<LocaleProvider locale={enUS}>
<Router history={history} routes={routes} />
</LocaleProvider>
);
If this is the right approach, I think it would be worth mention it in the documentation as well ;)
Hi, I'm following this tutorial and I was wondering how can I change the default language to spanish?.
I've seen this documentation https://ant.design/components/locale-provider but it doesn't show where should I do the changes so it's not very helpful, maybe that section of the documentation could be more explicit.
Thanks in advance for your help