<Trans />
component for next-intl
#952
Answered
by
victorvianaom
victorvianaom
asked this question in
Q&A
-
Hi there, thanks for this amazing project. {
"description": "We've sent a verification code to <bold>{{email}}</bold>."
} <Trans
i18nKey="account.emailConfirmation.description"
values={{ email }}
components={{
bold: <span fontWeight="bold" />,
}}
/> Above is a use case I have in my codebase. Is there a recomended way to do something similar in next-intl? I mean, for example, is it possible to make only a portion of the translation string be bold? |
Beta Was this translation helpful? Give feedback.
Answered by
victorvianaom
Mar 21, 2024
Replies: 1 comment
-
Oh sorry! now I see in the docs there are the methods |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
victorvianaom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh sorry! now I see in the docs there are the methods
t.markup()
andt.rich()
: https://next-intl-docs.vercel.app/docs/usage/messages#rich-textThis solves my usecase!