Files
simple-react-app-kit/packages/i18n/src/runtime/context.ts
T

14 lines
349 B
TypeScript
Raw Normal View History

import * as React from "react"
import type { AllMessages } from "@lingui/core"
import type { LocaleDefinition } from "./types"
export interface I18nRuntimeContextValue {
catalogs: AllMessages
locale: string
locales: readonly LocaleDefinition[]
}
export const I18nRuntimeContext =
React.createContext<I18nRuntimeContextValue | null>(null)