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

Possibility to wrap translation with tags #353

Closed
codefln opened this issue Feb 12, 2024 · 3 comments
Closed

Possibility to wrap translation with tags #353

codefln opened this issue Feb 12, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@codefln
Copy link

codefln commented Feb 12, 2024

Hi, I may have missed something, but is there an option within a translation file to wrap text with tags?

For example, I have this key:
'auth.confirm':
"I confirm that I am 18 years old and I've read the terms of service"

And in the component, I want to use
{t('auth.confirm', {link: })}

Thanks for the replies, sorry I had to create a issue

@codefln codefln added the enhancement New feature or request label Feb 12, 2024
@QuiiBz
Copy link
Owner

QuiiBz commented Feb 16, 2024

Hi, I'm not quite sure to understand your question. Could you expand a bit more your example?

@codefln
Copy link
Author

codefln commented Feb 16, 2024

Hi, I'm not quite sure to understand your question. Could you expand a bit more your example?

Sorry, github ate the markup

Key:
'auth.confirm': "I confirm that I am 18 years old and I've read the <a>terms of service</a>"

Call:
t('auth.confirm', {a: <a href='/terms' />})

HTML output:
I confirm that I am 18 years old and I've read the <a href='/terms'>terms of service</a>

@QuiiBz
Copy link
Owner

QuiiBz commented Feb 17, 2024

Oh thanks, that's kind of a duplicate of #343 - we'll likely land this feature in the V2: #359

@QuiiBz QuiiBz closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants