Closed shin10kudev closed 7 years ago
SOLUTION:
http://www.kanjidatabase.com/japanese_developer_tips.php (edited)
key point:
So I changed my code to:
var source = 'ja';
var target = 'en';
var text = encodeURIComponent(snapshot.val().ja);
promises.push(createTranslationPromise(source, target, text, snapshot, userId));
I noticed this by copy/pasting the Google Translate API url directly into my text editor, and saw the Japanese for 日本
was converted into %E6%97%A5%E6%9C%AC
.
Fixed
Perhaps this is a problem with the source text format
https://cloud.google.com/translate/docs/reference/translate
Take a look into the
format
parameter