Skip to content

useTranslation Hook not showing autocomplete for Next.js (TS) #2029

Discussion options

You must be logged in to vote

Upcoming release only (v13.0.0). In the meantime

import "react-i18next"; // (in the future 'i18next')

import type common from "../../public/locales/en/common.json";
import type main from "../../public/locales/en/main.json";
import type index from "../../public/locales/en/index.json";
import type login from "../../public/locales/en/login.json";
import type signup from "../../public/locales/en/signup.json";

interface I18nNamespaces {
    common: typeof common;
    main: typeof main;
    index: typeof index;
    login: typeof login;
    signup: typeof signup;
}

// (was 'i18next')
declare module "react-i18next" {
    interface CustomTypeOptions {
        defaultNS: "common";
        resources

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@belgattitude
Comment options

@abdulrahimiliasu
Comment options

@belgattitude
Comment options

@abdulrahimiliasu
Comment options

@belgattitude
Comment options

Answer selected by abdulrahimiliasu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants