mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2905] Added JSDocs for core (#3281)
* [ADF-2905] Updated JSDocs for core * [ADF-2905] Added missing JSDoc for user pref service
This commit is contained in:
committed by
Eugenio Romano
parent
d456b3cba1
commit
dd1b8893cc
@@ -90,6 +90,10 @@ export class TranslationService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a notification callback when the translation language changes.
|
||||
* @param lang The new language code
|
||||
*/
|
||||
onTranslationChanged(lang: string): void {
|
||||
this.translate.onTranslationChange.next({
|
||||
lang: lang,
|
||||
@@ -100,6 +104,7 @@ export class TranslationService {
|
||||
/**
|
||||
* Sets the target language for translations.
|
||||
* @param lang Code name for the language
|
||||
* @returns Translations available for the language
|
||||
*/
|
||||
use(lang: string): Observable<any> {
|
||||
this.customLoader.init(lang);
|
||||
@@ -110,6 +115,7 @@ export class TranslationService {
|
||||
* Gets the translation for the supplied key.
|
||||
* @param key Key to translate
|
||||
* @param interpolateParams String(s) to be interpolated into the main message
|
||||
* @returns Translated text
|
||||
*/
|
||||
get(key: string|Array<string>, interpolateParams?: Object): Observable<string|any> {
|
||||
return this.translate.get(key, interpolateParams);
|
||||
@@ -119,6 +125,7 @@ export class TranslationService {
|
||||
* Directly returns the translation for the supplied key.
|
||||
* @param key Key to translate
|
||||
* @param interpolateParams String(s) to be interpolated into the main message
|
||||
* @returns Translated text
|
||||
*/
|
||||
instant(key: string | Array<string>, interpolateParams?: Object): string | any {
|
||||
return this.translate.instant(key, interpolateParams);
|
||||
|
Reference in New Issue
Block a user