---
# System prepended metadata

title: Google Translate API

---

# Google Translate API
[Google Translate Official Website](https://cloud.google.com/translate/?hl=zh-tw)
[Language Code](https://cloud.google.com/translate/docs/languages)
### Reading Tutorials
- [GPT4 from Ben](https://hackmd.io/@hCJsGY_kTE-xOeLFtbW55w/Byxpaj_S2)
- [App 即時翻譯功能](https://www.appcoda.com.tw/google-translation-api/)
- [How to use Google Translate API in Android Studio projects?](https://medium.com/@yeksancansu/how-to-use-google-translate-api-in-android-studio-projects-7f09cae320c7)
### Examples
- [Codepen Very Easy Example with html, js](https://codepen.io/junior-abd-almaged/pen/gQEbRv)

    Steps: 
    1. Change ```targetLang``` ```sourceLang``` to desired langauge code

    ![](https://hackmd.io/_uploads/SkTeNM1I3.png)

- [Codepen Example with React](https://codepen.io/simogoodia/pen/QWaPLvG?editors=1010)

    Steps: 
    1. Add desired language codes to `countries`

    ![](https://hackmd.io/_uploads/SkVG9fkUh.png)

- [API for Google Translate for Node.js](https://github.com/vitalets/google-translate-api)
### Other Translation Alternatives
- Python library **googletrans** 
   - [Article - 使用 googletrans 套件來進行 Google 翻譯](https://clay-atlas.com/blog/2020/05/05/python-cn-note-package-googletrans-google-translate/)
   - [Video - Google Translate API with Python](https://www.youtube.com/watch?v=VIc_DDBpE7U)
- Microsoft Translator API (Bing)
    - [How to Integrate the Microsoft Translator API in Your Code](https://12ft.io/proxy?q=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-integrate-the-microsoft-translator-api-in-your-code-89bad979028e)
    - [ Bing Translator for Node.js](https://github.com/plainheart/bing-translate-api)