Earlier this week, we added two functions to Google spreadsheets that add translation and language detection capabilities.
- =GoogleTranslate("Hola, ¿cómo estás?","es","en") gives "Hi, how are you"
- =DetectLanguage("Hola, ¿cómo estás?") gives "es"
Breaking down the first function, =GoogleTranslate("field one", "field two," field three"), the first field should be the text you want to translate -- in this case "Hola, ¿cómo estás?". The second field should be the
two letter language code of the text you want to translate -- "es" is the two letter code for Spanish. Lastly, the final field indicates which language you want want the text to be translated into -- "en" is the two letter code for English. If you leave out the last field, the function will automatically translate the text into the language of the spreadsheet. The second function, =DetectLanguage("field one") works similarly and outputs the two letter language code of the text.
These functions open up some fun and interesting ways to use forms. For example, you could collect comments in many languages and use the two functions together to automatically translate responses into your native language.
If you hover over a cell with translated text, the original text is displayed.
If you want to try it out for yourself, check out
this template. We're excited about the possibilities this opens up and we hope you enjoy translating your spreadsheets.
Posted by: Frank Tang, Software Engineer
Tidak ada komentar:
Posting Komentar