Back to Blog

Translating Text and Detecting Language in Google Sheets

How to use GOOGLETRANSLATE and DETECTLANGUAGE to translate cells and identify languages directly inside a spreadsheet.

Jul 24th, 2026SheetFX

Translating Text and Detecting Language in Google Sheets

July 24th, 2026

If your spreadsheet fills up with text in more than one language — customer feedback, support tickets, survey responses, product reviews scraped from different regions — you don't need to copy cells into a translation tool one at a time. GOOGLETRANSLATE and DETECTLANGUAGE do both jobs inside the cell, and combined they let you turn a pile of mixed-language text into a single language you can actually filter, sort, and analyze.

Translating text with GOOGLETRANSLATE

=GOOGLETRANSLATE(text, source_language, target_language)
  • text — the string or cell reference to translate.
  • source_language — the language code of the input, e.g. "es", "ja", "de". Pass "auto" to let Sheets detect it for you.
  • target_language — the language code to translate into, e.g. "en".

The simplest case translates one cell:

=GOOGLETRANSLATE(A2, "fr", "en")

If you don't know (or don't want to hardcode) what language each row is in, use "auto" for the source:

=GOOGLETRANSLATE(A2, "auto", "en")

This is the version you'll use most often on real-world data, since a column of customer messages rarely comes in a single language. You can also drop the language arguments entirely and let Sheets guess both ends, but being explicit about the target language avoids surprises when your own Sheets locale isn't what you expect.

Detecting language with DETECTLANGUAGE

Sometimes you don't want to translate yet — you want to know what you're dealing with first. DETECTLANGUAGE returns an ISO language code for a cell or range:

=DETECTLANGUAGE(text_or_range)
=DETECTLANGUAGE(A2)

For a cell containing "The shipment arrived late", this returns en. For "El envío llegó tarde", it returns es. Run it down a column and you get a language tag per row — useful on its own for reporting ("what share of our feedback is in Portuguese?"), and useful as an input to conditional logic before you translate.

Worked example: multilingual customer feedback

Say column A holds raw feedback submitted through a form, in whatever language the customer typed:

A2: "Le produit est arrivé cassé, très déçu."
A3: "The delivery was super fast, thanks!"
A4: "配送がとても遅かったです。"

First, tag each row with its language so you can spot patterns later (are complaints clustered in one market?):

=DETECTLANGUAGE(A2)

Then translate everything into English in a separate column, so the rest of your sheet — sentiment scoring, keyword search, a QUERY summary — only has to deal with one language:

=GOOGLETRANSLATE(A2, "auto", "en")

Put both together and each row gets a detected source language in column B and a normalized English translation in column C:

B2: =DETECTLANGUAGE(A2)
C2: =GOOGLETRANSLATE(A2, B2, "en")

Feeding the detected language explicitly into GOOGLETRANSLATE (rather than using "auto" twice) means you only pay the detection cost once per row and can audit which language was detected if a translation looks off. Fill both formulas down the column and every new form submission gets classified and translated automatically.

Caveats worth knowing

  • Rate limits and quota. GOOGLETRANSLATE calls Google's translation service behind the scenes, and Sheets throttles how many calls a spreadsheet can make in a short window. Translating a few thousand rows at once can throw #ERROR! or Loading... that never resolves — recalculate in smaller batches if that happens.
  • Short strings translate poorly. Single words or fragments ("N/A", "Fix ASAP") often come back mistranslated or untouched, since there's little context for the engine to work with. Sentence-length feedback fares much better than terse tags.
  • Cache the result. Every time the sheet recalculates, GOOGLETRANSLATE re-runs and can quietly change previously translated text as the underlying model updates, or fail if quota is exhausted. Once you're happy with a batch of translations, select the column, copy it, and use Paste Special → Values only to freeze the results as plain text. This also protects historical rows from shifting if you re-sort or re-filter the sheet later.
  • DETECTLANGUAGE needs enough text. Very short or ambiguous strings (numbers, emoji-only messages, brand names) can return an incorrect or generic code — treat it as a strong hint, not ground truth, for anything you're reporting on.

Related functions

Newsletter

Get weekly Sheets tips in your inbox.

Short, practical Google Sheets and Apps Script updates — no noise, just formulas that work.