Giter Club home page Giter Club logo

google-translate-api's Introduction

google-translate-api

This is an exploratory self project, written in go, exploring the v2 (simple) and v3 (advanced) versions of the Google Translate API


Running this project

To run this project, you need to have docker installed, as well as having an API key and service account created for using V2 and V3 of the translate APIs. Place the values in the .env file.

To start running the local server at port 8080, simply run:

docker-compose up

Cloud Run

The V3 of the Translate API works without an API key, as long as a service account with the right permissions is assigned. It works because of Application Default Credentials

To build this project and testing in Cloud Run for V3 of the translate API (without using API Key), follow the following steps:

(make sure you replace the %GCP-PROJECT-ID% value to your project id)

  1. Build docker image
docker build -t gcr.io/%GCP-PROJECT-ID%/google-translate-api:0.0.1 --platform linux/amd64 -f tools/Dockerfile.cloudrun .
  1. Push the image to your image registry in your project
docker push gcr.io/%GCP-PROJECT-ID%/google-translate-api:0.0.2
  1. Visit Cloud Run, and create a new service using your new image and service account (which has the translate permissions assigned)

Viola! You're done!

google-translate-api's People

Contributors

weiyuan-lane avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.