ho i can replace jsx tags with i18next globaly ?
i know ho replace tags like {{}}
i18next.use<PostProcessorModule>({
type: 'postProcessor',
name: POST_PROCESSORS.game,
process( value, key, options, translator ) {
return value.replace( /{{GAME_TITLE}}/g, GAME_TITLE );
}
});
but how for jsx value ?
// how use global replace balise like <x></x>
i18next.use({
type: 'postProcessor',
name: POST_PROCESSORS.components,
});
example if i want this globally:
<Trans
components={{ t: <a title={'xxxx'} /> }}
i18nKey={'main:pages.game.introspection'}
/>
So replace by a component link and title and the value used as id.