File

platform-components-ng/projects/platform-components-lib/src/lib/components/translations/service/translation.service.ts

Description

Attribute service

Index

Methods

Constructor

constructor(http: HttpClient, assetService: AssetService)
Parameters :
Name Type Optional
http HttpClient No
assetService AssetService No

Methods

createTranslation
createTranslation(translation, applyToAllChild: boolean)

Create translation for contentType

Parameters :
Name Type Optional Default value Description
translation No

translation configuration

applyToAllChild boolean No false

applyToAllChild configuration

Returns : any

Observable

createTranslationInstances
createTranslationInstances(assetId: number, versionInfo: VersionInfo, translations: Translation[])

Create translation instances for an asset

Parameters :
Name Type Optional Description
assetId number No

asset Id

versionInfo VersionInfo No

Version info

translations Translation[] No

translation configurations

Returns : any

Observable<any[]>

deleteTranslation
deleteTranslation(translationId: number)

Delete translation for given translation id

Parameters :
Name Type Optional Description
translationId number No

translation id

Returns : any

Observable

getTranslationByContenttypeId
getTranslationByContenttypeId(contenttypeId: number)

Get translations for contentType id

Parameters :
Name Type Optional
contenttypeId number No
Returns : any

Observable<Translation[]>

getTranslationInstances
getTranslationInstances(assetId: number, assetVersion: VersionInfo, fetchAssetDetails)

Get translation instances of an asset

Parameters :
Name Type Optional Default value Description
assetId number No

asset Id of the asset

assetVersion VersionInfo No

Version info

fetchAssetDetails No false

Whether to get translated asset details or not

Returns : Observable<any[]>

Observable<any[]>

overrideTranslations
overrideTranslations(contentTypeId: number)

Override translations for all child content types

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

Returns : any

Promise

updateTranslation
updateTranslation(translationId: number, translation: Translation, applyToAllChild: boolean)

Update translation for given translation id

Parameters :
Name Type Optional Default value Description
translationId number No

translation id

translation Translation No

translation configuration

applyToAllChild boolean No false

applyToAllChild configuration

Returns : any

Observable

result-matching ""

    No results matching ""