-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Milestone
Description
Description
Write a dedicate section/page about how internalization should be used within JavaScript modules, in particular when components from different modules are used on the same page.
For now, we only have this comment:
Line 16 in ebc52f7
| // IMPORTANT: Always use useTranslation() (not { t } from "i18next") in React components. |
TL;DR
In short, we should always use:
import { useTranslation } from "react-i18next";
...
const { t } = useTranslation();
...
<p>{t("my-key")}</p>For both client and server code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation