0.0.5 • Published 6 months ago
@types/i18n-abide v0.0.5
Installation
npm install --save @types/i18n-abide
Summary
This package contains type definitions for i18n-abide (https://github.com/mozilla/i18n-abide).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/i18n-abide.
index.d.ts
// Type definitions for i18n-abide 0.0
// Project: https://github.com/mozilla/i18n-abide
// Definitions by: Steven Bell <https://github.com/smbell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { RequestHandler } from 'express';
export function abide(options?: AbideOptions): RequestHandler;
export function parseAcceptLanguage(header?: string): Array<{ lang: string, quality: number }>;
export function bestLanguage(languages: Array<{ lang: string, quality: number}>, supported_languages: string[], defaultLanguage: string): string;
export function localeFrom(language?: string): string;
export function languageFrom(locale?: string): string;
export function normalizeLanguage(language?: string): string;
export function normalizeLocale(locale?: string): string;
export function format(fmt: string, obj?: any, named?: boolean): string;
export function getLocales(): string[];
export interface AbideOptions {
gettext_alias?: string | undefined;
supported_languages?: string[] | undefined;
default_lang?: string | undefined;
debug_lang?: string | undefined;
disable_locale_check?: boolean | undefined;
translation_directory?: string | undefined;
logger?: { warn(msg: string): void, error(msg: string): void } | undefined;
}
Additional Details
- Last updated: Thu, 08 Jul 2021 14:23:03 GMT
- Dependencies: @types/express
- Global values: none
Credits
These definitions were written by Steven Bell.