Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.59 KB

api.md

File metadata and controls

37 lines (25 loc) · 1.59 KB

TranslateJSONObject() ⇒ Object

TranslateJSONObject - A Node.js module to translate a JSON object from a detectable language to any other language currently via google or yandex translate API

Kind: global function
Returns: Object - Module API

TranslateJSONObject~init(options) ⇒ boolean

init - Initialize the setting of your module instance, it takes a setting object

Kind: inner method of TranslateJSONObject
Returns: boolean - indicate if the module is configured properly

Param Type
options Object

TranslateJSONObject~translate(srcObj, language) ⇒ Promise

translate - Translate an object to any given language, it returns a promise with the translated object

Kind: inner method of TranslateJSONObject
Returns: Promise - It returns a promise with the translated object

Param Type Description
srcObj Object The object to be translated
language String The language you wish to translate too, accept the code e.g 'es', 'fr', 'ar' ...