@elsikora/x-captcha-react
Version:
React components for X-Captcha service
14 lines (13 loc) • 585 B
TypeScript
import type { TTranslateFunction } from "../type";
import { ELanguage } from "../enum";
/**
* Creates a translation function for the specified language
* @param {ELanguage | string} lang The language to use
* @returns {TTranslateFunction} A function that translates keys to the specified language
*/
export declare function createTranslator(lang: ELanguage | string): TTranslateFunction;
/**
* Detects the user's preferred language from the browser
* @returns {ELanguage} The detected language code or fallback to English
*/
export declare function detectLanguage(): ELanguage;