0

https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJDzcum_mb_DkRk5QKN0b39C4&key=api_key

I requested this API and received the review, but it appears that my review text is in Bengali while the displayed text is in English. How can I ensure that English reviews are shown in English and Bengali reviews are shown in Bengali or their respective languages?

I will display the language in which the user has provided a review on my web site.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
AlAmin
  • 3
  • 2
  • You could use a package to determine all of that yourself. https://www.npmjs.com/package/@smodin/fast-text-language-detection – Yewla Jun 21 '23 at 18:14
  • We can't tell you why some other server acts the way it does. This doesn't seem like a programming problem that you can solve. – Barmar Jun 21 '23 at 18:37
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jun 21 '23 at 21:54

1 Answers1

0

The Place Details API offers an optional parameter called reviews_no_translations that allows you to control this:

https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJDzcum_mb_DkRk5QKN0b39C4&fields=reviews&reviews_no_translations=true&key=api_key

vpgcloud
  • 1,294
  • 2
  • 10
  • 19