2026-07-29 21:23:00 +08:00
|
|
|
import * as React from "react"
|
|
|
|
|
|
2026-07-30 14:47:42 +08:00
|
|
|
import type { IntlFormatters, LocaleDefinition, MessageCatalogs } from "./types"
|
2026-07-29 21:23:00 +08:00
|
|
|
|
|
|
|
|
export interface I18nRuntimeContextValue {
|
2026-07-30 14:47:42 +08:00
|
|
|
catalogs: MessageCatalogs
|
|
|
|
|
formatters: IntlFormatters
|
|
|
|
|
locale: LocaleDefinition
|
2026-07-29 21:23:00 +08:00
|
|
|
locales: readonly LocaleDefinition[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const I18nRuntimeContext =
|
|
|
|
|
React.createContext<I18nRuntimeContextValue | null>(null)
|