Multilingual

Label Service

The Wikidata label service is the easiest way to get human-readable names for entities in your preferred languages with automatic fallbacks.

How the Label Service Works

The label service automatically creates ?varLabel variables for any ?var in your query. It retrieves the label in your specified language, falling back to other languages if not available.

Basic Label Service Usage
Run ↗
SELECT ?lang ?langLabel
WHERE {
  ?lang wdt:P31 wd:Q9143 .  # programming language

  # This service creates ?langLabel automatically
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
LIMIT 20

Language Fallback Chains

Specify multiple languages separated by commas. The service tries each language in order and uses the first available label.

Fallback Chain: French → English → German
Run ↗
SELECT ?city ?cityLabel
WHERE {
  ?city wdt:P31 wd:Q515 ;
        wdt:P17 wd:Q39 .  # Switzerland

  SERVICE wikibase:label {
    # Try French first, then English, then German
    bd:serviceParam wikibase:language "fr,en,de" .
  }
}
LIMIT 20
Auto-Language Detection
Run ↗
SELECT ?item ?itemLabel
WHERE {
  ?item wdt:P31 wd:Q33506 .  # museum

  SERVICE wikibase:label {
    # [AUTO_LANGUAGE] uses browser language
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
  }
}
LIMIT 10

Descriptions and Aliases

The service also creates ?varDescription and ?varAltLabel (aliases) variables automatically.

Labels, Descriptions, and Aliases
Run ↗
SELECT ?lang ?langLabel ?langDescription ?langAltLabel
WHERE {
  VALUES ?lang {
    wd:Q2005   # JavaScript
    wd:Q15777  # Python
    wd:Q2407   # C++
  }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}

Cultural Heritage Examples

Museums with Localized Names
Run ↗
SELECT ?museum ?museumLabel ?city ?cityLabel
WHERE {
  ?museum wdt:P31/wdt:P279* wd:Q207694 ;  # art museum
          wdt:P17 wd:Q38 ;                 # Italy
          wdt:P131 ?city .

  SERVICE wikibase:label {
    # Italian first, then English
    bd:serviceParam wikibase:language "it,en" .
  }
}
LIMIT 30

Urban Examples

Cities in Local Language
Run ↗
SELECT ?city ?cityLabel ?country ?countryLabel
WHERE {
  ?country wdt:P31 wd:Q6256 ;
           wdt:P36 ?city .
  FILTER(?country IN (
    wd:Q183,  # Germany
    wd:Q142,  # France
    wd:Q29,   # Spain
    wd:Q38    # Italy
  ))

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "de,fr,es,it,en" .
  }
}

Best Practices