UNPKG

a11y-player

Version:

An accessible DAISY format audiobook player for React applications

18 lines (17 loc) 944 B
export type TranslationKey = 'audioPlayer' | 'previousSection' | 'nextSection' | 'play' | 'pause' | 'backward30Seconds' | 'forward30Seconds' | 'speed' | 'decreasePlaybackRate' | 'increasePlaybackRate' | 'toggleSectionsView' | 'shareLink' | 'linkCopied' | 'failedToCopy' | 'tableOfContents' | 'noTitle' | 'unknownAuthor' | 'defaultBookTitle'; export type Translations = { [key in TranslationKey]: string; }; export type SupportedLanguage = 'en' | 'fr' | 'de' | 'it' | 'es'; /** * Get translations for a specific language, falling back to English if not supported * @param lang Language code (2 letters) * @returns Translation object */ export declare const getTranslations: (lang: string) => Translations; /** * Create a translation function for a specific language * @param lang Language code * @returns Function to get translated strings */ export declare const createTranslator: (lang: string) => (key: TranslationKey) => string;