initial commit
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
/* ============================================================================
|
||||
I18N - public surface
|
||||
----------------------------------------------------------------------------
|
||||
Import everything from "~/i18n". The sub-modules are implementation detail,
|
||||
except `~/i18n/config` which loaders and `app/routes.ts` may import directly
|
||||
to stay clear of anything that pulls in React.
|
||||
========================================================================= */
|
||||
|
||||
export {
|
||||
DEFAULT_LOCALE,
|
||||
dirFor,
|
||||
getLocaleFromPathname,
|
||||
INTL_LOCALE,
|
||||
isLocale,
|
||||
LOCALE_ENDONYM,
|
||||
LOCALE_SHORT_LABEL,
|
||||
localeFromRequest,
|
||||
negotiateLocale,
|
||||
negotiateLocaleFromRequest,
|
||||
OG_LOCALE,
|
||||
parseAcceptLanguage,
|
||||
SUPPORTED_LOCALES,
|
||||
} from "./config";
|
||||
export type { Direction, LanguageRange, Locale } from "./config";
|
||||
|
||||
export {
|
||||
createTranslator,
|
||||
getMessages,
|
||||
interpolate,
|
||||
translate,
|
||||
} from "./t";
|
||||
export type {
|
||||
Messages,
|
||||
MessageKey,
|
||||
TranslationKey,
|
||||
TranslationParams,
|
||||
Translator,
|
||||
} from "./t";
|
||||
|
||||
export {
|
||||
alternatePath,
|
||||
buildLocalizedHref,
|
||||
getCounterpartLocale,
|
||||
isCurrentPath,
|
||||
localeAlternates,
|
||||
localizedPath,
|
||||
ROUTE_SECTION_GROUPS,
|
||||
ROUTE_SLUGS,
|
||||
ROUTE_SLUG_KEYS,
|
||||
sectionPath,
|
||||
sectionSlugPath,
|
||||
stripLocale,
|
||||
} from "./paths";
|
||||
export type {
|
||||
CounterpartPathOptions,
|
||||
RouteSectionGroupId,
|
||||
RouteSlugKey,
|
||||
} from "./paths";
|
||||
|
||||
export {
|
||||
formatDate,
|
||||
formatDateRange,
|
||||
formatDateTime,
|
||||
formatFileSize,
|
||||
formatNumber,
|
||||
intlLocale,
|
||||
toIsoDate,
|
||||
} from "./format";
|
||||
export type { DateStyle } from "./format";
|
||||
|
||||
export {
|
||||
useAlternatePath,
|
||||
useDirection,
|
||||
useLocale,
|
||||
useRouteHandleValue,
|
||||
useTranslation,
|
||||
} from "./hooks";
|
||||
export type { Translation } from "./hooks";
|
||||
Reference in New Issue
Block a user