Google Translate Api Language Codes ((exclusive)) Jun 2026
If you do not know the language of the input text, you can omit the sourceLanguageCode (in v3) or set the source to auto (in v2). The API will analyze the text, identify the language code, and translate it to the specified target.
Whether you are using the Basic edition (v2) or the Advanced edition (v3), every translation request requires specific source and target language codes. Using the wrong code (e.g., zh-CN vs. zh-TW ) can break your user interface or deliver culturally inappropriate content. google translate api language codes