-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hi there!
Thank you for this great work! I am trying to create a CMS that has English and Norwegian as base languages. I followed the guide here:
https://www.cannercms.com/docs/guides-internationalization
In this project, there was no canner.server.js, so I created one and included the following as test code:
//canner.server.js
exports.cms.i18nMessages = {
en: {
'hours_label': 'Opening Hours'
},
no: {
'hours_label': 'Opening Hours Norwegian'
}
}
Then in one of my schema, I added:
<string keyName="hours" title="${hours_label}"/>
When I run, it doesn't render the text; instead, it just shows as hours_label.
I also tried react-intl. But react-intl somehow does not work for components. It works on higher level such as in dashboard.js. For components, the function {this.props.intl.formatMessage(messageObj)} works but does not appear localized based on selected language. It doesn't seem to get the IntlProvider data.
I'll be thankful if you can set me in the right direction for internationalization.