mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-10-05 18:44:46 +02:00
25 lines
800 B
TypeScript
25 lines
800 B
TypeScript
import merge from 'deepmerge'
|
|
|
|
import { MessageObject } from './types'
|
|
|
|
// defineMessages allow us to define and extract dynamic message ids
|
|
const defineMessages = (i: Record<string, MessageObject>) => i
|
|
|
|
export { $locale as locale, loadLocale as preloadLocale } from './stores/locale'
|
|
export {
|
|
$dictionary as dictionary,
|
|
$locales as locales,
|
|
addMessagesTo,
|
|
} from './stores/dictionary'
|
|
export { $loading as loading } from './stores/loading'
|
|
export { $format as format, $format as _, $format as t } from './stores/format'
|
|
|
|
// utilities
|
|
export { defineMessages, merge }
|
|
export { customFormats, addCustomFormats } from './includes/formats'
|
|
export { getClientLocale } from './includes/utils'
|
|
export {
|
|
flushQueue as waitLocale,
|
|
registerLocaleLoader as register,
|
|
} from './includes/loaderQueue'
|