react-i18next icon indicating copy to clipboard operation
react-i18next copied to clipboard

default wrap component ?

Open jonlepage opened this issue 1 year ago • 1 comments

hi, I can't seem to find information on how to default wrap my raw string in

elements

to adhere to HTML and SEO conventions.

https://react.i18next.com/latest/trans-component


is there a way to do something like ?

	<Trans
		defaultcomponent=<MyCustomDefaultWrap />
		components={{...}}
	>
		{content}
	</Trans>

image


note: the transWrapTextNodes in init config seem not work and crash. image

thanks for help

jonlepage avatar May 26 '24 03:05 jonlepage

Try transWrapTextNodes: 'p'

But maybe you mean defaultTransParent: 'p'

adrai avatar May 26 '24 08:05 adrai

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 02:04 stale[bot]