all-iso-language-codes
Version:
List of all iso 639-1, 639-2T, 639-2B, 639-3 codes with their translations in any language
15 lines (14 loc) • 812 B
TypeScript
import all from '../data/all.json';
export type IsoType = keyof typeof all;
export declare const getEnglishName: (code: string) => string | null;
export declare const getName: (code: string, language?: string) => string | null;
export declare const getNativeName: (code: string) => string | null;
export declare const isValid: (code: string, availableIsoTypes?: IsoType[] | null, moreInfo?: boolean) => boolean | {
iso: "639-1" | "639-2B" | "639-2T" | "639-3" | null;
found: boolean;
};
export declare const getIsoCodesFromNativeName: (nativeName: string, normalizeName?: boolean) => IsoType[] | null;
export declare const getAll639_1: () => string[];
export declare const getAll639_2B: () => string[];
export declare const getAll639_2T: () => string[];
export declare const getAll639_3: () => string[];