All user interface text must be internationalized using the appropriate i18n module instead of hardcoded strings. This ensures the application can be properly localized for different languages and regions.
All user interface text must be internationalized using the appropriate i18n module instead of hardcoded strings. This ensures the application can be properly localized for different languages and regions.
Key implementation guidelines:
useTranslation
hook to access translation stringsen/common.json
, en/dashboard.json
)Example:
// Incorrect approach
<Heading ml={1} size="xs">
Favorite Dags
</Heading>
// Correct approach
import { useTranslation } from "react-i18next";
// Within component
const { t: translate } = useTranslation("dashboard");
<Heading ml={1} size="xs">
{translate("favorite.favoriteDags")}
</Heading>
When adding new UI text:
This practice improves accessibility, enables global adoption, and follows proper documentation standards for international software.
Enter the URL of a public GitHub repository