It is currently 21 April 2025, 18:21 Advanced search

nessuno ha mai usato le API google Translate?

Domande e risposte su come utilizzare Instant Developer Foundation al meglio

nessuno ha mai usato le API google Translate?

Postby texw » 30 December 2024, 8:28

ciao a tutti, nel prodotto che sto sviluppando mi piacerebbe intrudurre la possibilità di gestire le traduzioni dei testi tramite API Google

questo sarebbe in codice che google mi suggerisce di implementare per gestire la traduzione:

Code: Select all
from googleapiclient.discovery import build
service = build('translate', 'v2', developerKey=APIKEY)

# use the service
inputs = text_file.readlines()
outputs = service.translations().list(source='en', target='fr', q=inputs).execute()
# print outputs
for input, output in zip(inputs, outputs['translations']):
print("{0} -> {1}".format(input, output['translatedText']))


nessuno si è mai cimentato e potrebbe dare un suggerimento?
altrimenti provo a passare dalla assistenza, e poi vi aggiorno
CadCentric
texw
 
Posts: 492
Joined: 1 February 2018, 8:25

Return to Tips & Tricks - Foundation

Who is online

Users browsing this forum: Google [Bot] and 40 guests

cron