api.i18n
I18nApi
The plugin's words in the editor's language: its own catalogues, and a t over them.
The plugin's words in the editor's language. The editor's own chrome is translated
the same way — English text as the key, a flat catalogue per language — and a plugin
brings its catalogues and gets a t over them: an untranslated string is its own
English. Placeholders are {name}, {n, plural, one {…} other {…}},
{x, select, …} and, for Korean, {name|을} (the particle agrees with the value).
Members
register
register(catalogues: Record<string, Record<string, string>>): Disposable;
Add catalogues, keyed by language; a later one overrides earlier entries.
t
t(text: string, params?: Record<string, string | number>): string;
The text in the current language, placeholders filled; the text itself when there is no translation.
tc
tc(context: string, text: string, params?: Record<string, string | number>): string;
t with a context, for the same English words meant differently in two places.