@fabwcie/free-drawing / @types/i18n
@types/i18n
Type Aliases
CustomTranslations
CustomTranslations =
Partial<Record<Language,Partial<Translations> &PluginTexts>>
Defined in: packages/free-drawing/src/@types/i18n.ts:20
Texts of languages replacing default ones (e.g. { fr: { 'menu.open': 'Ouvrir un dessin' } }), also of plugins
Language
Language = keyof typeof
languages
Defined in: packages/free-drawing/src/@types/i18n.ts:11
Code of a language of interface (en, fr, es, de)
PluginTexts
PluginTexts =
Record<string,string>
Defined in: packages/free-drawing/src/@types/i18n.ts:23
Texts of a plugin in a language, by key (keys of its own, e.g. stamps.insert, tools.stamp)
PluginTranslations
PluginTranslations =
Partial<Record<Language,PluginTexts>>
Defined in: packages/free-drawing/src/@types/i18n.ts:26
Texts of a plugin by language (Plugin.addTranslations), English used for missing ones
Translate
Translate = (
key,params?) =>string
Defined in: packages/free-drawing/src/@types/i18n.ts:17
Function giving the text of a key in current language, placeholders replaced by params (drawer.t)
Parameters
key
params?
Returns
string
TranslationKey
TranslationKey = keyof typeof
en
Defined in: packages/free-drawing/src/@types/i18n.ts:5
Key of a text of interface
TranslationParams
TranslationParams =
Record<string,string|number>
Defined in: packages/free-drawing/src/@types/i18n.ts:14
Values of {name} placeholders of a text
Translations
Translations =
Record<TranslationKey,string>
Defined in: packages/free-drawing/src/@types/i18n.ts:8
All texts of interface in a language