Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Initial Translations Setup #23

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

matin-deriv
Copy link
Contributor

  • Simply import the hook in your component:
    import { useTranslation } from 'react-i18next';

  • Use the t function from the hook:
    const { t } = useTranslation();

  • Put the string inside the t function:
    <Layout>{t('Welcome to React')}</Layout>

src/constants/urls.ts Show resolved Hide resolved
src/main.tsx Outdated Show resolved Hide resolved
tsconfig.json Show resolved Hide resolved
src/translations/i18n.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@niloofar-deriv niloofar-deriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@matin-deriv matin-deriv merged commit 4a362ab into deriv-com:main Oct 23, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants