I am using the admin template for react : coreui. To translate my labels in the component, I am using react-intl.
I would like to translate the navbar which is a simple array like that :
export default {
items: [
{
title: true,
name: 'ESSAI DOM',
},
{
name: 'Schools',
url: '/schools',
icon: 'fa fa-university'
},
.... other items...
],
};
My translations are in a json like that (example for 'french'):
{
"Schools.Schools.title": "Ecoles"
}
In this example, I would like to write something like :
{
name : some_function(languageId, 'Schools.Schools.title'),
.....
}
How can I do that?