You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Translate module the Google cloud package.
Google translate API allows the user to specify the format for translation as a query parameter (text, or html, defaults to html) https://cloud.google.com/translate/v2/translate-reference
Defaulting to HTML format translations means the translation results contain HTML entities, which is not desired in most cases when using the API, because results are not displayed directly on a web page. This package should allow sending the format as a parameter, probably as part of the options parameter to the translate function.
Environment details
OS: Any
Node.js version: 6.5.1
npm version: 3.8.9
google-cloud-node version: 0.39.0
Steps to reproduce
var googleCloud = require('google-cloud');
var gtranslate = googleCloud.translate;
var translator = gtranslate({
key: API_KEY,
});
translator.translate('How are you today?', {source: 'en', target: 'fr', format: 'text'}, (err, result) => {
console.log(result);
});
Expected results: Comment allez-vous aujourd'hui?
Actual results: Comment allez-vous aujourd'hui?
Thanks!
The text was updated successfully, but these errors were encountered:
Whoops, I didn't realize we were doing that! We will definitely open up that option. Any interest in sending a PR? We've got a big backlog, so any help is greatly appreciated :)
I am using the Translate module the Google cloud package.
Google translate API allows the user to specify the format for translation as a query parameter (text, or html, defaults to html) https://cloud.google.com/translate/v2/translate-reference
Defaulting to HTML format translations means the translation results contain HTML entities, which is not desired in most cases when using the API, because results are not displayed directly on a web page. This package should allow sending the format as a parameter, probably as part of the options parameter to the translate function.
Environment details
Steps to reproduce
Expected results: Comment allez-vous aujourd'hui?
Actual results: Comment allez-vous aujourd'hui?
Thanks!
The text was updated successfully, but these errors were encountered: