From 4b26f679fd819609a751743918ca41725d9291dc Mon Sep 17 00:00:00 2001 From: "Nicholas Carrigan (he/him)" Date: Thu, 4 Mar 2021 22:16:36 -0800 Subject: [PATCH] docs: codify trans tag (#41367) * docs: codify trans tag * fix(docs): remove extraneous backslash --- docs/how-to-translate-the-website.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how-to-translate-the-website.md b/docs/how-to-translate-the-website.md index 6ce0c5dc60..2d1abfedf9 100644 --- a/docs/how-to-translate-the-website.md +++ b/docs/how-to-translate-the-website.md @@ -103,7 +103,7 @@ const username = 'moT'; The above example passes an object to the `t` function with a `username` variable. The variable will be used in the JSON value where `{{username}}` is. -## Translate with the \ Component +## Translate with the `Trans` Component The general rule is to use the "t" function when you can. But there's a `Trans` component for when that isn't enough, usually when you have elements embedded in the text. You can use the `Trans` component with any type of react component.