Closed johnfelipe closed 8 years ago
Felipe, you can use a http header Accept-Language: es
to get the tone names in Spanish directly from the APIs. I guess this is what you need (not too clear from your question).
where can find that? Or where put in tone-analyzer-nodejs demo?
Where add or edit 'Accept-Language: es'?
me again where put Accept-Language: es
// Create the service wrapper
var toneAnalyzer = watson.tone_analyzer({
url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
username: '<username>',
password: '<password>',
version_date: '2016-05-19',
version: 'v3',
headers: {
'Accept-Language': 'es'
}
});
var toneAnalyzer = watson.tone_analyzer({
url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
username: 'e9f75e44-491a-47e1-bbe3-5a9889366758',
password: 'my password',
version_date: '2016-05-19',
version: 'v3',
headers: {
'Accept-Language': 'es'
}
});
npm install
and pm2 reload server.js
and not work
I don't know what pm2 is and I'm sure it's not part of this sample.
On Mon, Jun 20, 2016 at 12:42 PM felipe notifications@github.com wrote:
var toneAnalyzer = watson.tone_analyzer({ url: 'https://gateway.watsonplatform.net/tone-analyzer/api/', username: 'e9f75e44-491a-47e1-bbe3-5a9889366758', password: 'my password', version_date: '2016-05-19', version: 'v3', headers: { 'Accept-Language': 'es' } });
npm install and pm2 reload server.js
and not work
— You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub https://github.com/watson-developer-cloud/tone-analyzer-nodejs/issues/80#issuecomment-227198319, or mute the thread https://github.com/notifications/unsubscribe/AATHReCDRq1dzCruGmDcxN6f9t37kiKHks5qNsL-gaJpZM4I3r-h .
pm2 is same like npm server.js
// Create the service wrapper
var toneAnalyzer = watson.tone_analyzer({
url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
username: 'e9f75e44-491a-47e1-bbe3-5a9889366758',
password: 'xxxxxxxx',
version_date: '2016-05-19',
version: 'v3',
headers: {
'Accept-Language': 'es'
}
});
not working
http://181.135.20.181:3012/ is not working git pull and nothing yet to spanish
var toneAnalyzer = watson.tone_analyzer({
url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
username: 'xxxxx',
password: 'xxxxxx',
version_date: '2016-05-19',
version: 'v3',
headers: {
'Accept-Language': 'es'
}
});
Is not working http://181.135.20.181:3012/
Pls help
Can you give a little more information about what exactly is not working? If your getting error messages can you attach them with the issue?
is not error only i cant see in spanish, pls put a spanish text in Tu Propio Texto
The node-sdk
version that was used here was a little bit old. I updated the dependency in the package.json
and was able to get Spanish results from the API.
On the other hand, this demo doesn't support Spanish. Parts of the UI need the emotions/tones to be in English.
version_date: '2016-05-19', version: 'v3', headers: { 'Accept-Language': 'es'
i pull, update
is not working
As I said in my comment above. The demo doesn't work in English. The API does.
sudo nano /home/felipe/tone-analyzer-nodejs/public/js/components/App.js
But not working How solved?