[ADF-1769] Added JSDocs for services (#2961)

This commit is contained in:
Andy Stark
2018-02-19 17:28:44 +00:00
committed by Eugenio Romano
parent 6d0bab9278
commit de575fd47b
10 changed files with 178 additions and 54 deletions
+15 -11
View File
@@ -4,17 +4,21 @@ Supports localisation.
## Methods
`addTranslationFolder(name: string = '', path: string = '')`<br/>
Adds a new folder of translation source files.
`use(lang: string): Observable<any>`<br/>
Sets the target language for translations.
`get(key: string|Array<string>, interpolateParams?: Object): Observable<string|any>`<br/>
Gets the translation for the supplied key.
`instant(key: string | Array<string>, interpolateParams?: Object): string | any`<br/>
Directly returns the translation for the supplied key.
- `addTranslationFolder(name: string = '', path: string = '')`
Adds a new folder of translation source files.
- `name` - Name for the translation provider
- `path` - Path to the folder
- `use(lang: string): Observable<any>`
Sets the target language for translations.
- `lang` - Code name for the language
- `get(key: string|Array<string>, interpolateParams?: Object): Observable<any>`
Gets the translation for the supplied key.
- `key` - Key to translate
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message
- `instant(key: string | Array<string>, interpolateParams?: Object): any`
Directly returns the translation for the supplied key.
- `key` - Key to translate
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message
## Details