0

When running my code I noticed that the translatedText didn't show up correctly. Instead of the text written in a different language, I got a bunch of question marks.

Edit: I noticed that languages like Spanish and French were printed, but other languages like Japanese, Hebrew had question marks instead...

enter image description here

Here's my code:

import os
from google.cloud import translate_v2

os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = r'GOOGLE_APPLICATION_CREDENTIALS.json'

translate_client = translate_v2.Client()

text = 'Hi. How are You'
target = 'ja'

output = translate_client.translate(text, target_language=target)
print(output)
Haru825
  • 21
  • 4

0 Answers0