Preparing search index...

    Function useI18n

    • Hook to use translations in React components

      Returns {
          t: TFunction<"translation", undefined>;
          setLocale: (locale: string) => Promise<any>;
          getLocale: () => string;
          getAvailableLocales: () => ("en" | "fr")[];
          getLocaleName: (locale: string) => string;
      }

      Translation functions and utilities

      • t: TFunction<"translation", undefined>
      • setLocale: (locale: string) => Promise<any>

        Changes the current locale

      • getLocale: () => string

        Gets the current locale

      • getAvailableLocales: () => ("en" | "fr")[]

        Gets all available locales

      • getLocaleName: (locale: string) => string

        Gets the locale name in its own language