@cds/core
Version:
Clarity Design System - common components, themes, and utilties
102 lines (101 loc) • 2.69 kB
TypeScript
export interface I18nStrings {
custom?: any;
actions: {
sort: string;
expand: string;
close: string;
resize: string;
filter: string;
};
alert: {
closeButtonAriaLabel: string;
loading: string;
info: string;
success: string;
warning: string;
danger: string;
};
dropdown: {
open: string;
};
file: {
browse: string;
files: string;
removeFile: string;
};
modal: {
closeButtonAriaLabel: string;
contentStart: string;
contentBox: string;
contentEnd: string;
};
overlay: {
closeButtonAriaLabel: string;
contentStart: string;
contentEnd: string;
};
popup: {
closeButtonAriaLabel: string;
contentStart: string;
contentEnd: string;
};
navigation: {
navigationElement: string;
navigationLabel: string;
navigationAbridgedText: string;
navigationUnabridgedText: string;
};
password: {
showButtonAriaLabel: string;
hideButtonAriaLabel: string;
};
progress: {
loading: string;
looping: string;
};
treeview: {
loading: string;
};
grid: {
resizeColumn: string;
closeDetails: string;
noData: string;
rowDetailStart: string;
rowDetailEnd: string;
footerEnd: string;
action: string;
dropTarget: string;
pagination: {
label: string;
firstPage: string;
previousPage: string;
nextPage: string;
lastPage: string;
pageSize: string;
page: string;
};
};
}
export declare const componentStringsDefault: I18nStrings;
declare type PartialRecursive<T> = T extends object ? {
[K in keyof T]?: PartialRecursive<T[K]>;
} : T;
/**
* I18nService is a static class that gives users the ability to use and override
* strings within the components for internationalization / globalization. One
* can override default values globally for their application or override per
* component instance as needed.
*
* Use the localize method to override values globally. For per component instance,
* use the i18n decorator.
*/
export declare class I18nService {
static get keys(): Readonly<I18nStrings>;
static findKey(keyValueObj: any): string | undefined;
static get(key: string): any;
/** @private */
static reset(): void;
static hydrate(i18nObject: object, componentInstance: any): any;
static localize(overrides: PartialRecursive<I18nStrings>): void;
}
export {};