npm.io
0.0.5 • Published 2 years ago

@types/i18n-abide

Licence
MIT
Version
0.0.5
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

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

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: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: @types/express

Credits

These definitions were written by Steven Bell.