-
-
Save JT5D/a2fdfefa80124a06f5a9 to your computer and use it in GitHub Desktop.
| Eg. URL translating en page to es | |
| http://translate.google.com/translate?hl=en&sl=en&tl=es&u=http://about.com | |
| Define the web interface language to be English by adding | |
| hl=en to the end of the URL and after the change the URL will look | |
| like this: | |
| http://www.google.com/search?hl=en | |
| When you use more than one setting code in the URL, you need to use | |
| the & character between them. For example, if you also want to define | |
| the search language to be English you need to use the & character | |
| between the codes like this: | |
| http://www.google.com/search?hl=en&lr=lang_en | |
| Because the above URL probably won't work so that the selected search | |
| language will be used if you try do a search on that page, you also | |
| need to add a search query (q=) to the URL, so the resulting URL will | |
| be: | |
| http://www.google.com/search?hl=en&lr=lang_en&q=example | |
| Remember to press Enter (or equivalent key) on your keyboard after | |
| adding the needed characters. | |
| Web Interface Language Codes | |
| hl=af Afrikaans | |
| hl=ak Akan | |
| hl=sq Albanian | |
| hl=am Amharic | |
| hl=ar Arabic | |
| hl=hy Armenian | |
| hl=az Azerbaijani | |
| hl=eu Basque | |
| hl=be Belarusian | |
| hl=bem Bemba | |
| hl=bn Bengali | |
| hl=bh Bihari | |
| hl=xx-bork Bork, bork, bork! | |
| hl=bs Bosnian | |
| hl=br Breton | |
| hl=bg Bulgarian | |
| hl=km Cambodian | |
| hl=ca Catalan | |
| hl=chr Cherokee | |
| hl=ny Chichewa | |
| hl=zh-CN Chinese (Simplified) | |
| hl=zh-TW Chinese (Traditional) | |
| hl=co Corsican | |
| hl=hr Croatian | |
| hl=cs Czech | |
| hl=da Danish | |
| hl=nl Dutch | |
| hl=xx-elmer Elmer Fudd | |
| hl=en English | |
| hl=eo Esperanto | |
| hl=et Estonian | |
| hl=ee Ewe | |
| hl=fo Faroese | |
| hl=tl Filipino | |
| hl=fi Finnish | |
| hl=fr French | |
| hl=fy Frisian | |
| hl=gaa Ga | |
| hl=gl Galician | |
| hl=ka Georgian | |
| hl=de German | |
| hl=el Greek | |
| hl=gn Guarani | |
| hl=gu Gujarati | |
| hl=xx-hacker Hacker | |
| hl=ht Haitian Creole | |
| hl=ha Hausa | |
| hl=haw Hawaiian | |
| hl=iw Hebrew | |
| hl=hi Hindi | |
| hl=hu Hungarian | |
| hl=is Icelandic | |
| hl=ig Igbo | |
| hl=id Indonesian | |
| hl=ia Interlingua | |
| hl=ga Irish | |
| hl=it Italian | |
| hl=ja Japanese | |
| hl=jw Javanese | |
| hl=kn Kannada | |
| hl=kk Kazakh | |
| hl=rw Kinyarwanda | |
| hl=rn Kirundi | |
| hl=xx-klingon Klingon | |
| hl=kg Kongo | |
| hl=ko Korean | |
| hl=kri Krio (Sierra Leone) | |
| hl=ku Kurdish | |
| hl=ckb Kurdish (Soranî) | |
| hl=ky Kyrgyz | |
| hl=lo Laothian | |
| hl=la Latin | |
| hl=lv Latvian | |
| hl=ln Lingala | |
| hl=lt Lithuanian | |
| hl=loz Lozi | |
| hl=lg Luganda | |
| hl=ach Luo | |
| hl=mk Macedonian | |
| hl=mg Malagasy | |
| hl=ms Malay | |
| hl=ml Malayalam | |
| hl=mt Maltese | |
| hl=mi Maori | |
| hl=mr Marathi | |
| hl=mfe Mauritian Creole | |
| hl=mo Moldavian | |
| hl=mn Mongolian | |
| hl=sr-ME Montenegrin | |
| hl=ne Nepali | |
| hl=pcm Nigerian Pidgin | |
| hl=nso Northern Sotho | |
| hl=no Norwegian | |
| hl=nn Norwegian (Nynorsk) | |
| hl=oc Occitan | |
| hl=or Oriya | |
| hl=om Oromo | |
| hl=ps Pashto | |
| hl=fa Persian | |
| hl=xx-pirate Pirate | |
| hl=pl Polish | |
| hl=pt-BR Portuguese (Brazil) | |
| hl=pt-PT Portuguese (Portugal) | |
| hl=pa Punjabi | |
| hl=qu Quechua | |
| hl=ro Romanian | |
| hl=rm Romansh | |
| hl=nyn Runyakitara | |
| hl=ru Russian | |
| hl=gd Scots Gaelic | |
| hl=sr Serbian | |
| hl=sh Serbo-Croatian | |
| hl=st Sesotho | |
| hl=tn Setswana | |
| hl=crs Seychellois Creole | |
| hl=sn Shona | |
| hl=sd Sindhi | |
| hl=si Sinhalese | |
| hl=sk Slovak | |
| hl=sl Slovenian | |
| hl=so Somali | |
| hl=es Spanish | |
| hl=es-419 Spanish (Latin American) | |
| hl=su Sundanese | |
| hl=sw Swahili | |
| hl=sv Swedish | |
| hl=tg Tajik | |
| hl=ta Tamil | |
| hl=tt Tatar | |
| hl=te Telugu | |
| hl=th Thai | |
| hl=ti Tigrinya | |
| hl=to Tonga | |
| hl=lua Tshiluba | |
| hl=tum Tumbuka | |
| hl=tr Turkish | |
| hl=tk Turkmen | |
| hl=tw Twi | |
| hl=ug Uighur | |
| hl=uk Ukrainian | |
| hl=ur Urdu | |
| hl=uz Uzbek | |
| hl=vi Vietnamese | |
| hl=cy Welsh | |
| hl=wo Wolof | |
| hl=xh Xhosa | |
| hl=yi Yiddish | |
| hl=yo Yoruba | |
| hl=zu Zulu | |
| Search Language Codes | |
| lr=lang_af Afrikaans | |
| lr=lang_ar Arabic | |
| lr=lang_hy Armenian | |
| lr=lang_be Belarusian | |
| lr=lang_bg Bulgarian | |
| lr=lang_ca Catalan | |
| lr=lang_zh-CN Chinese (Simplified) | |
| lr=lang_zh-TW Chinese (Traditional) | |
| lr=lang_hr Croatian | |
| lr=lang_cs Czech | |
| lr=lang_da Danish | |
| lr=lang_nl Dutch | |
| lr=lang_en English | |
| lr=lang_eo Esperanto | |
| lr=lang_et Estonian | |
| lr=lang_tl Filipino | |
| lr=lang_fi Finnish | |
| lr=lang_fr French | |
| lr=lang_de German | |
| lr=lang_el Greek | |
| lr=lang_iw Hebrew | |
| lr=lang_hi Hindi | |
| lr=lang_hu Hungarian | |
| lr=lang_is Icelandic | |
| lr=lang_id Indonesian | |
| lr=lang_it Italian | |
| lr=lang_ja Japanese | |
| lr=lang_ko Korean | |
| lr=lang_lv Latvian | |
| lr=lang_lt Lithuanian | |
| lr=lang_no Norwegian | |
| lr=lang_fa Persian | |
| lr=lang_pl Polish | |
| lr=lang_pt Portuguese | |
| lr=lang_ro Romanian | |
| lr=lang_ru Russian | |
| lr=lang_sr Serbian | |
| lr=lang_sk Slovak | |
| lr=lang_sl Slovenian | |
| lr=lang_es Spanish | |
| lr=lang_sw Swahili | |
| lr=lang_sv Swedish | |
| lr=lang_th Thai | |
| lr=lang_tr Turkish | |
| lr=lang_uk Ukrainian | |
| lr=lang_vi Vietnamese | |
| Short Textual List of Only the Language Codes | |
| af, ach, ak, am, ar, az, be, bem, bg, bh, bn, br, bs, ca, chr, ckb, | |
| co, crs, cs, cy, da, de, ee, el, en, eo, es, es-419, et, eu, fa, fi, | |
| fo, fr, fy, ga, gaa, gd, gl, gn, gu, ha, haw, hi, hr, ht, hu, hy, ia, | |
| id, ig, is, it, iw, ja, jw, ka, kg, kk, km, kn, ko, kri, ku, ky, la, | |
| lg, ln, lo, loz, lt, lua, lv, mfe, mg, mi, mk, ml, mn, mo, mr, ms, mt, | |
| ne, nl, nn, no, nso, ny, nyn, oc, om, or, pa, pcm, pl, ps, pt-BR, | |
| pt-PT, qu, rm, rn, ro, ru, rw, sd, sh, si, sk, sl, sn, so, sq, sr, | |
| sr-ME, st, su, sv, sw, ta, te, tg, th, ti, tk, tl, tn, to, tr, tt, | |
| tum, tw, ug, uk, ur, uz, vi, wo, xh, xx-bork, xx-elmer, xx-hacker, | |
| xx-klingon, xx-pirate, yi, yo, zh-CN, zh-TW, zu. | |
| Links | |
| Related Pages | |
| Google Translate | |
| Google Transliteration | |
| Google in Your Language | |
| Google Translator Toolkit | |
| Google Translate Blog | |
| News | |
| Google search now supports Cherokee (March 2011) | |
| Listen to us now! (December 2010) | |
| On-screen Keyboards on Google Translate (December 2010) | |
| Google Launches Cantonese Voice Search in Hong Kong (December 2010) | |
| Transliteration goes global (December 2009) | |
| 51 Languages in Google Translate (August 2009) | |
| Fork of the following work: | |
| ---------------------------------------------------------------------- | |
| Copyright (C) 2007—2012: Tomi Häsä (tomi.hasa@gmail.com). | |
| Disclaimer: This article is provided as is without any express or | |
| implied warranties. While every effort has been taken to ensure the | |
| accuracy of the information contained in this article, the | |
| contributor assumes no responsibility for errors or omissions, or for | |
| damages resulting from the use of the information contained herein. | |
You are missing:
'ceb' Cebuano, 'hmn' Hmong, 'lb' Luxembourgish, 'sm' Samoan
I'd like to suggest edits to the codes. Some of the Balkans codes in the file no longer exist. Here's a brief interaction I had with Google Gemini while trying to figure out why the SH designation for Serbo-Croation yields an ERROR.
Google Language Codes (for translations)
I'm using this Google language code to translate English words to Serbo-Croation =GOOGLETRANSLATE(A2, "en", "sh"), per the language codes listed here: https://gist.github.com/JT5D/a2fdfefa80124a06f5a9 But I'm getting an ERROR message in the column with my translation formula. Am I wrong in using SH as the translation code for Serbo-Croation?
Yes, you are encountering an error because Google Translate no longer supports the umbrella code "sh" for Serbo-Croatian. While "sh" was the historical ISO 639-1 code for Serbo-Croatian, it has been officially deprecated in many modern IT systems, including Google's API, in favor of specific national languages.
To fix the error in your spreadsheet, you must use the specific code for the dialect or nation you are targeting.
Correct Language Codes for the Region
You should replace "sh" with one of the following active codes:
• Serbian: sr
• Croatian: hr
• Bosnian: bs
If you want the most common translation for that region, your formula should look like this:
=GOOGLETRANSLATE(A2, "en", "sr") (for Serbian) OR =GOOGLETRANSLATE(A2, "en", "hr") (for Croatian)
Why "sh" is Failing
The code "sh" was used when Serbo-Croatian was treated as a single unified language. Following the dissolution of Yugoslavia, the language was officially split into Serbian, Croatian, Bosnian, and Montenegrin. Google Translate transitioned its database to reflect these distinct standards to ensure accuracy in grammar, vocabulary, and alphabet (Serbian often uses Cyrillic, while Croatian uses Latin).
Technical Definitions
• ISO 639-1: A standardized nomenclature used to classify languages with two-letter codes. "sh" is considered a "deprecated" code within this system for most modern applications.
• Deprecated: In computing, this refers to a feature or code that is still available but is being phased out and should no longer be used because it may not work correctly.
• Cyrillic vs. Latin Alphabets: Serbian (sr) can be written in either script, but Google Translate defaults to Cyrillic for "sr" unless specified otherwise. Croatian (hr) and Bosnian (bs) exclusively use the Latin alphabet.
Citations
"GoogleTranslate Function List." Google Docs Editors Help, 2026. https://support.google.com/docs/answer/3093331. Verified active Jan 2026.
"ISO 639-1 Language Codes." International Organization for Standardization, 2026. https://www.iso.org/iso-639-language-codes.html. Verified active Jan 2026.
"Serbo-Croatian Language Classification." Ethnologue, 2026. https://www.ethnologue.com/language/hbs/. Verified active Jan 2026.
Are there any more machine readable versions of this?