Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typed-i18next does not support Interpolation #7

Open
Pasalietis opened this issue Nov 6, 2019 · 1 comment
Open

typed-i18next does not support Interpolation #7

Pasalietis opened this issue Nov 6, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Pasalietis
Copy link

image

@MartynasZilinskas MartynasZilinskas added the enhancement New feature or request label Nov 6, 2019
@FDiskas
Copy link

FDiskas commented Mar 29, 2021

I simply use this typing instead a library:

// import the original type declarations
import 'react-i18next';
// import all namespaces (for the default language, only)
import common from 'public/locales/en-AU/common.json';

declare module 'react-i18next' {
    interface Resources {
        common: typeof common;
    }
}

one disadvantage is that I can't type untranslated strings.
Official docs: https://react.i18next.com/latest/typescript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants