Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default wrap component ? #1755

Open
jonlepage opened this issue May 26, 2024 · 1 comment
Open

default wrap component ? #1755

jonlepage opened this issue May 26, 2024 · 1 comment

Comments

@jonlepage
Copy link

jonlepage commented May 26, 2024

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

@adrai
Copy link
Member

adrai commented May 26, 2024

Try transWrapTextNodes: 'p'

But maybe you mean defaultTransParent: 'p'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants