manishkatyan / strapi-google-translator

Translate Strapi collections into multiple languages using Google Cloud Translation
10 stars 8 forks source link

Unable to get response from google cloud translation #19

Closed Ankita1012 closed 1 year ago

Ankita1012 commented 1 year ago

Required System information

  1. Node.js version: v16.17.0
  2. NPM version: 8.15.0
  3. Strapi version: 4.8.2
  4. Operating system: Windows 11
  5. Is your project Javascript or Typescript: Javascript

Describe the bug

I have set the translator plugin in the plugins sections of the Strapi. However when I tried to translate the content I'm unable to get response from google cloud translation: unexpected end of JSON input .

Screenshot (21)

Steps to reproduce the behavior

  1. Install Strapi
  2. add environment variables in .env file
  3. Copy API token generated from strapi and JSON file downloaded from Service Account in .env file
  4. Go to Config> plugins.js add code snippet Screenshot (23)
  5. npm run build
  6. npm run develop
  7. setting -> Translator -> Configuration.
  8. save the Translator confiiguration.
  9. Translator was successfully added to the UI but I get an error as shown in the first image image

Expected behavior Translator plugin should enables us to translate Strapi content into any other languages.

nishekh-e-r commented 1 year ago

Hi, @Ankita1012. Please check GOOGLE_TRANSLATE_JSON in yours.env file. The format of the variable should be in one line. strapi-google-translator Please check in the Installation part for the format of GOOGLE_TRANSLATE_JSON