File

translation-editor/data/translation-store.service.ts

Index

Properties
Methods

Constructor

constructor(appService: ApplicationService, appState: AppStateService, zip: ZipService)
Parameters :
Name Type Optional
appService ApplicationService No
appState AppStateService No
zip ZipService No

Methods

Async getAvailableTranslations
getAvailableTranslations(locales: string[])

Retrieves a list of available translations for the given locales from all the hosted apps available on the tenant.

Parameters :
Name Type Optional
locales string[] No
Returns : unknown
Async getCombinedListOfTranslationsForPerKey
getCombinedListOfTranslationsForPerKey(locales: string[])

Retrieves a combined list of translations for all the provided locales. The locales are combined into a single object per key and an array of these objects is returned.

Parameters :
Name Type Optional
locales string[] No
Returns : Promise<literal type[]>
Async getOrCreateTranslationApp
getOrCreateTranslationApp()

The translation app for the current tenant. If it does not exist, it will be created.

Async getTranslationsForLocale
getTranslationsForLocale(locale: T)
Type parameters :
  • T

Retrieves the translations for the given locale from the translation app.

Parameters :
Name Type Optional
locale T No
Returns : Promise<literal type>
Async loadTranslationsForLocales
loadTranslationsForLocales(locales: string[])

Retrieves the translations for the given locales from the translation app.

Parameters :
Name Type Optional
locales string[] No
Returns : Promise<literal type>
Async updateTranslations
updateTranslations(translations: literal type[])

Updates the files of the translation application with the provided translations.

Parameters :
Name Type Optional
translations literal type[] No
Returns : Promise<void>

Properties

Protected Readonly translationAppContextPath
Type : string
Default value : 'user-defined-translations'
Protected Readonly translationAppName
Type : string
Default value : 'User defined translations'

results matching ""

    No results matching ""