Language Detector icon

Language Detector

Detects language and country codes from ISO codes, language/country names (TR/EN/native)

Language Detector

AI-generated

Summary

Detects a language from each input item’s configured value and adds language and country metadata to the item. Choose how to supply the value, name the output fields with a prefix, and set what happens when no match is found.

Inputs

  • Input Field (required) — Defaults to chatInput. Enter a field name or dot path such as body.Country, an n8n expression, or a direct value such as UKRAINE. The node checks the item field first; if it is empty or missing and the configured text resolves as a language or country, it uses that text directly.
  • Output Prefix — Defaults to lang. Prefixes the added fields, for example lang_iso2, lang_country_iso2, and lang_name_tr.
  • On Not Found — Defaults to Keep Item with Nulls. Choose to keep the item with null language fields, skip it, or throw an error when the value cannot be resolved.

Output shape

One output item per matched input item, with the original JSON fields plus language and country metadata.

With the default prefix, successful matches add lang_field, lang_mode, lang_input, lang_country_iso2, lang_iso3, lang_iso2, lang_name_tr, lang_name_en, lang_name_native, lang_direction, and lang_found; they also add customer_lang_main formatted as Turkish name (English name). lang_direction defaults to ltr when no direction is specified. With the nulls option, the same metadata fields are added with nulls for unresolved language data and lang_found: false. The country code may be null when the input identifies a language without a country.

Links

Discussion