The result from DETECTLANGUAGE is a short language code indicating the language.

Some of these codes are intuitive, but some aren’t.

See below for a list of common language codes.

DETECTLANGUAGE example: Get language codes

The DETECTLANGUAGE function uses Microsoft Translation Services, so it requires an internet connection.

Basic Example

To use the DETECTLANGUAGE function, simply provide some text.

The TRANSLATE function supports over 100 languages, so there aremanypotential codes.

DETECTLANGUAGE example: Get language codes

See below for a list of common languages and codes.

The goal is to determine the language codes based on the text in column B.

To learn more see ourExcel Table guide.

DETECTLANGUAGE example: Get language codes

Note that some languages, like Portuguese, have more than one variant.

The DETECTLANGUAGE function supports over 130 languages.

you’re free to find the full list of supported languageshere.

DETECTLANGUAGE example: Get language codes

The source and target languages are provided as special codes.

DETECTLANGUAGE example: Get language codes

A language lookup table for DETECTLANGUAGE

Using XLOOKUP to get the language name using the code

Excel TRANSLATE function

DETECTLANGUAGE example: Get language codes

Using XLOOKUP to get the language name using the code