14 lines
349 B
TypeScript
14 lines
349 B
TypeScript
|
|
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)
|