Skip to main content

I18nService

I18nService​

Signature
class I18nService implements OnModuleInit {
addTranslationFile(langKey: string, filePath: string) => void;
addTranslation(langKey: string, resources: VendureTranslationResources | any) => void;
}
  • Implements: OnModuleInit

addTranslationFile​

method
(langKey: string, filePath: string) => void

Add a I18n translation by json file

addTranslation​

method
(langKey: string, resources: VendureTranslationResources | any) => void

Add a I18n translation (key-value) resource

VendureTranslationResources​

I18n resources used for translations

Signature
interface VendureTranslationResources {
error: any;
errorResult: any;
message: any;
}

error​

property
any

errorResult​

property
any

message​

property
any