MCPcopy Create free account
hub / github.com/ZingerLittleBee/ServerBee / activeLocale

Function activeLocale

apps/web/src/lib/format.ts:11–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 * tracking the current language (components re-render on switch via useTranslation).
10 */
11export function activeLocale(): string {
12 const lang = i18next.resolvedLanguage ?? i18next.language ?? 'en'
13 return lang.startsWith('zh') ? 'zh-CN' : 'en-US'
14}
15
16export function formatDate(date: Date | string | number | undefined, opts: Intl.DateTimeFormatOptions = {}) {
17 if (!date) {

Callers 4

formatRelativeTimeFunction · 0.90
formatDateFunction · 0.85
formatDateShortFunction · 0.85
formatDateTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected