Reactjs - Translate string with components enclosed

157 views Asked by At

I need to translate "Access denied. Please log in" with "log in" enclosed by Link component.

I am using a react-redux-i18n helper.

import {I18n} from 'react-redux-i18n';

render() {
    return (<Jumbotron>{I18n.t('accessDeny')}</Jumbotron>);
}

I have tried

export default {
  accessDeny: "Access denied. Please <Link to='/'>log in</Link>",
}

but it is returned as plain string:

Access denied. Please <Link to='/'>log in</Link>

Instead of "log in" in hyperlink:

Access denied. Please <a href='/'>log in</a>

Can you please give me some suggestions?

0

There are 0 answers