API

 

TranslationConverter

This interface defines a method that a custom translation converter has to implement:

interface TranslationConverter {
  convert(
    language: string,
    resource: Resource,
    translations: any
  ): object;
}

convert()

Converts the translations of custom format to a JavaScript object.

language
The language of the translation items.
resource
The data of the translation file downloaded.
translations
The response data provided by the translation loader.

Returns an object that contains the translation items.