Reputation: 621
I've created a react application using create-react-app, and installed element-react as a dependency. I followed the instructions stated here to use internationalization -- specifically adding these lines of code to what I think is the entry file (App.js):
import { i18n } from 'element-react'
import locale from 'element-react/src/locale/lang/en'
i18n.use(locale);
Unfortunately, this doesn't work. The other approach stated is using webpack but I don't want to do that. How do I make internationalization work with element-react? What is the entry file in a react application?
Upvotes: 1
Views: 266
Reputation: 621
Actually, it did work when I placed the il8n code in index.js
. It just doesn't seem to work for tables when they don't have data. The workaround for that is to set the emptyText
property of the Table
component.
Upvotes: 2