I am trying to make a application which supports multi language for this Im using react-intl which translates the data. While doing this Im facing a problem that when I am trying to translate it returns me as [OBJECT OBJECT] but im expecting a string.
I am using "react-intl": "2.7.2" for translation , "react-c3js": "^0.1.20", for rendering c3 JS chart
Barchart Code. In this i want labels to be Transalted into different language
<BarChartWithLine
data={this.state.topMerchants}
xAxisLable={<InjectIntl/>}
yAxisLable="TRANSACTION COUNT"
y2AxisLable="SUCCESS RATE"
barColor="#6BD0F6"
successRateData={
this.state.topMerchantsSuccessRate
}
In injectIntl file
const LocalesMenu = ({ intl }) => {
const placeholder = intl.formatMessage({id: 'transaction.merchantID'});
return (<div>{placeholder}</div>);
}
I am getting output as [OBJECT OBJECT]