I have a javascript function from creating localized strings as follows...
let strings = new LocalizedStrings({
en:{
sites:"Sites",
addSite:"Add a new site",
online:"Online"
},
it: {
sites:"Siti",
addSite:"Aggiungi un nuovo sito",
online:"in linea"
}
});
I use this in my page like this..
<p>
{strings.sites}
</p>
My question is how do I pass this into my JSON because I need to update the column headings in my table which uses JSON to define this (see the 'name' heading)...
const columns = [
{
name: 'Id',
selector: 'id',
sortable: true,
hide: 6000,
},
{
name: '{strings.online}',
selector: 'cloudAccessEnabled',
sortable: true,
minWidth: '10px',
center: true,
cell: row => (
<MDBIcon icon="circle"
className={row.cloudAccessEnabled === true ? 'green-text' : 'red-text'} />
)
},