Google Translate API authentication key and usage
问题 From https://cloud.google.com/translate/docs/basic/setup-basic, there's a need to set the environmental variable: export GOOGLE_APPLICATION_CREDENTIALS='/path/to/credential.json' Then a curl request can be made as such: curl -s -X POST -H "Content-Type: application/json" \ -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \ --data "{ 'q': 'The Great Pyramid of Giza (also known as the Pyramid of Khufu or the Pyramid of Cheops) is the oldest and largest of the