dap-design-system
Version:
Official design system for the DÁP (dap.gov.hu)
24 lines (23 loc) • 860 B
TypeScript
import { default as i18next, t } from 'i18next';
import { translate } from 'lit-i18n';
export declare function update(): void;
/**
* Detects whether a locale prefers 12-hour or 24-hour time format.
* Uses dayjs locale data to determine the preference.
* @param locale - The locale to check (e.g., 'en', 'hu', 'en-US', 'hu-HU', 'de', 'de-DE')
* @returns '12h' for 12-hour format, '24h' for 24-hour format
*/
export declare function getTimeFormatPreference(locale: string): '12h' | '24h';
/**
* Manually register a Day.js locale that has been imported.
* Use this if automatic locale loading fails.
*
* @example
* ```ts
* import 'dayjs/locale/fr'
* import { registerDayjsLocale } from 'dap-design-system'
* registerDayjsLocale('fr')
* ```
*/
export declare function registerDayjsLocale(localeCode: string): void;
export { i18next, t, translate };