@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
14 lines (13 loc) • 1.13 kB
TypeScript
import { ReactNode, FC } from 'react';
export declare const supportedLanguage: readonly ["en-US", "de-DE", "fr-FR", "en-GB", "it-IT", "es-ES", "pt-PT", "pt-BR", "pl", "sv-SE", "nl-NL", "tr", "cs", "hu", "ru", "zh-CN", "zh-TW", "ko", "ja", "bg", "da", "ro", "sk", "sl", "th"];
export type FormatReactElementFn = (value: string) => ReactNode;
export type LanguageType = (typeof supportedLanguage)[number];
interface UserLanguageProviderProps {
userLanguage: LanguageType;
children: ReactNode;
}
export declare const UserLanguageProvider: FC<UserLanguageProviderProps>;
export declare function useUserLanguage(): "th" | "tr" | "pl" | "en-US" | "de-DE" | "fr-FR" | "en-GB" | "it-IT" | "es-ES" | "pt-PT" | "pt-BR" | "sv-SE" | "nl-NL" | "cs" | "hu" | "ru" | "zh-CN" | "zh-TW" | "ko" | "ja" | "bg" | "da" | "ro" | "sk" | "sl";
type MissingKeysHandler = (path: string, key: string, language: LanguageType) => void;
export declare function initTranslations(missingKeysHandler?: MissingKeysHandler): (translations: Partial<Record<LanguageType, any>>, path?: string) => (key: string, options?: Record<string, any>) => any;
export {};