language-management-lib
Version:
A TypeScript library for managing language translations in applications with URL parameter support.
38 lines (37 loc) • 1.3 kB
TypeScript
export type Language = {
[key: string]: {
[key: string]: string;
};
};
export type LanguageToProps<T extends Language> = {
[K in keyof T]: {
[P in keyof T[K]]: string;
};
};
export declare const lng: {
readonly en: {
readonly welcome: "Welcome to our website!";
readonly description: "This is a description";
readonly login: "Login";
readonly logout: "Logout";
readonly home: "Home";
readonly about: "About";
};
readonly ka: {
readonly welcome: "ჩვენს ვებსაიტზე კეთილი იყოს თქვენი მობრძანება!";
readonly description: "ეს არის აღწერა";
readonly login: "შესვლა";
readonly logout: "გასვლა";
readonly home: "მთავარი";
readonly about: "ჩვენს შესახებ";
};
readonly de: {
readonly welcome: "Willkommen auf unserer Website!";
readonly description: "Das ist eine Beschreibung";
readonly login: "Anmelden";
readonly logout: "Abmelden";
readonly home: "Startseite";
readonly about: "Über uns";
};
};
export type SampleLanguageType = typeof lng;