{"id":2096,"library":"language-data","title":"Language Data","description":"language-data is a Python library that provides supplementary data about languages, primarily intended to be consumed by the `langcodes` module. It bundles data from the Unicode Common Locale Data Repository (CLDR). The current version is 1.4.0. Releases are irregular, often coinciding with updates to the CLDR specification, typically one to two times per year.","status":"active","version":"1.4.0","language":"en","source_language":"en","source_url":"https://github.com/georgkrause/language_data","tags":["language","localization","i18n","l10n","data","cldr","langcodes"],"install":[{"cmd":"pip install language-data","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"language-data is a data package; its primary purpose is to be installed alongside and used by the `langcodes` library, not to be directly imported for public symbols or functions.","symbol":"language_data","correct":"import langcodes\n# The language-data library provides data that langcodes automatically uses.\n# Direct imports from language_data are generally not needed for its primary use case."}],"quickstart":{"code":"# language-data is a data dependency for langcodes.\n# After installing both 'langcodes' and 'language-data',\n# langcodes will automatically utilize the data provided by language-data.\n\nimport langcodes\n\n# Example: Get a Language object from langcodes\nenglish_us = langcodes.Language.get('en-US')\nprint(f\"Code: {english_us}\")\nprint(f\"English Name: {english_us.display_name('en')}\")\n\n# Example: Work with a less common language code\nnl_be = langcodes.Language.get('nl-BE')\nprint(f\"\\nCode: {nl_be}\")\nprint(f\"French Name: {nl_be.display_name('fr')}\")\nprint(f\"Dutch Name: {nl_be.display_name('nl')}\")\n\n# The functionality of langcodes, such as display_name, depends on the data\n# provided by the language-data package. If language-data were not installed\n# or was an older version, langcodes might fall back to less detailed data\n# or an internal, potentially outdated dataset.","lang":"python","description":"This quickstart demonstrates how the `langcodes` library, after `language-data` is installed, automatically leverages its language data. Users typically interact with `language-data` indirectly through `langcodes`, which processes and presents the data."},"warnings":[{"fix":"Upgrade your Python environment to 3.10 or newer to use language-data >= 1.4.0.","message":"Starting with version 1.4.0, support for Python 3.9 has been officially dropped. Users on Python 3.9 or older must remain on language-data < 1.4.0.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Install `langcodes` alongside `language-data` and use `langcodes` for language-related operations. The data will be automatically utilized.","message":"This library primarily serves as a data package for `langcodes` and does not expose a public API for direct interaction. Most users should interact with language data through `langcodes` rather than attempting to import or process `language-data`'s internal structures directly.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the changelog (e.g., GitHub releases) for specific CLDR version updates and any related data changes before deploying new versions of `language-data` in production.","message":"The data provided by `language-data` is updated based on new CLDR releases. This means that language properties, aliases, and official codes can subtly change between `language-data` versions. Always review the changelog for CLDR updates when upgrading to ensure compatibility with your application's assumptions.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}