This extension provides hover information for translations in your VS Code project. It recognizes translation keys while using i18next for react and displays their corresponding translations as a hover message.
- Hover over a translation key in your code to see its translation in english.
- Automatically finds the nearest translation file based on your project structure.
- Supports:
t("fileName:translationKey")
t("fileName:translationKey.nestedTranslationKey")
t("translationKey")
- while usingconst { t } = useTranslation("fileName")
i18nKey="fileName:translationKey"
- Provide correct paths to your translations folders related to root of your react project.
- Provide correct settings in
settings.json
e.g.:{"reacti18nextTranslationOnHover.defaultLocale": "en-GB", "reacti18nextTranslationOnHover.translationFolderPaths": ["translations", "public/translations"]}
By default locale is set to been-GB
and folders to be["translations", "public/translations", "public/locales"]
- Hover over a translation key to see its translation.