express-intlayer
Version:
Manage internationalization i18n in a simple way for express application.
18 lines (17 loc) • 898 B
TypeScript
import { getDictionary as getDictionary$1, getIntlayer as getIntlayer$1 } from "@intlayer/core";
import { Locale, StrictModeLocaleMap } from "@intlayer/types";
import { NextFunction, Request, RequestHandler, Response } from "express";
//#region src/index.d.ts
declare const translateFunction: (_req: Request, res: Response, _next?: NextFunction) => <T extends string>(content: StrictModeLocaleMap<T> | string, locale?: Locale) => T;
/**
* Detect locale used by the user and load it into res locale storage
*
* @returns
*/
declare const intlayer: () => RequestHandler;
declare const t: <Content = string>(content: StrictModeLocaleMap<Content>, locale?: Locale) => Content;
declare const getIntlayer: typeof getIntlayer$1;
declare const getDictionary: typeof getDictionary$1;
//#endregion
export { getDictionary, getIntlayer, intlayer, t, translateFunction };
//# sourceMappingURL=index.d.ts.map