@intl-t/react
Version:
A Fully-Typed Object-Based i18n Translation Library for React
10 lines (9 loc) • 352 B
TypeScript
import { Locale } from "@intl-t/locales";
import { ReactState, ReactSetState } from "@intl-t/react/types";
export declare function useLocale<L extends Locale = Locale>(defaultLocale?: L | undefined | null, { hydration, path, }?: {
hydration?: boolean;
path?: string;
}): L & ReactState<L> & {
locale: L;
setLocale: ReactSetState<L>;
};