countrystatecity-translations
Official Python package for 4,724 country-name translations covering 250 countries across 19 languages. Part of the countrystatecity ecosystem.
From offline prototype to production
This package provides a versioned offline snapshot. For regularly updated data, server-side search and filtering, field-selected responses, or managed availability and support, use the Country State City API through its official Python client:
pip install countrystatecity-api
from countrystatecity import CountryStateCity
csc = CountryStateCity() # reads CSC_API_KEY
Get a free API key · API docs · Pricing · Migration guide
Keep API keys in server-side environment variables, never in client-side code or source control.
Installation
pip install countrystatecity-translations
Quick Start
from countrystatecity_translations import (
get_all_translations,
get_translations_by_country,
get_translations_by_language,
get_translation,
search_translations,
)
# Get all translation entries
translations = get_all_translations()
# [Translation(countryCode="AF", lang="fr", translation="Afghanistan", ...), ...]
# Get all translations for a country (all 19 languages)
de_translations = get_translations_by_country("DE")
# [Translation(countryCode="DE", lang="fr", translation="Allemagne", ...), ...]
# Get all countries translated into a specific language
french = get_translations_by_language("fr")
# [Translation(lang="fr", translation="Afghanistan", ...), ...]
# Lookup a single translation
t = get_translation("DE", "fr")
# Translation(countryCode="DE", countryName="Germany", lang="fr", translation="Allemagne")
# Search translated names
results = search_translations("Allemagne")
Data Model
class Translation(BaseModel):
countryCode: str # ISO2 country code (e.g., "DE")
countryName: str # English country name (e.g., "Germany")
lang: str # Language code (e.g., "fr")
translation: str # Translated country name (e.g., "Allemagne")
Supported Languages
| Code | Language | Code | Language |
|---|---|---|---|
ar |
Arabic | ko |
Korean |
br |
Breton | nl |
Dutch |
de |
German | pl |
Polish |
es |
Spanish | pt |
Portuguese |
fa |
Persian | pt-BR |
Portuguese (Brazil) |
fr |
French | ru |
Russian |
hi |
Hindi | tr |
Turkish |
hr |
Croatian | uk |
Ukrainian |
it |
Italian | zh-CN |
Chinese (Simplified) |
ja |
Japanese |
API Reference
| Function | Description |
|---|---|
get_all_translations() |
Get all translation entries |
get_translations_by_country(code) |
Get all language translations for a country |
get_translations_by_language(lang) |
Get all countries translated into a language |
get_translation(code, lang) |
Get a single country-language translation |
search_translations(query) |
Search by translated name or English country name |
License
ODbL-1.0 — see LICENSE.
Other Packages in this Ecosystem
| Package | Description |
|---|---|
| countrystatecity-api | Official API client — live data, sync + async, typed |
| countrystatecity-countries | 250 countries, 5,327 states, 156,169 cities |
| countrystatecity-timezones | 432 country/timezone associations with country associations and time conversion |
| countrystatecity-currencies | 249 country/currency associations |
| countrystatecity-phonecodes | International phone/dialing codes for 250 countries |
| countrystatecity-regions | Region and subregion associations for 250 countries |
| countrystatecity-postal-codes | Postal/ZIP records for 117 countries |
Data sourced from countries-states-cities-database.
Made with ❤️ by dr5hn
Metadata
Release files for countrystatecity-translations 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| countrystatecity_translations-3.0.1.tar.gz | 111.0 kB | With provenance | Details for countrystatecity_translations-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| countrystatecity_translations-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for countrystatecity_translations-3.0.1-py3-none-any.whl |
Total release size: 220.5 kB
Release files / countrystatecity_translations-3.0.1.tar.gz
| Download URL | countrystatecity_translations-3.0.1.tar.gz |
|---|---|
| Size | 111.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06e2dc411a9f5c7451c229f18e8e45235f585e62adcd52b381b924502d041b5d
|
|
BLAKE2b-256 checksum How to use checksums |
2780cb346fe1a4f6252f6c2ecfbd773af342f09a61856c1dec0b99a288a35650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logRelease files / countrystatecity_translations-3.0.1-py3-none-any.whl
| Download URL | countrystatecity_translations-3.0.1-py3-none-any.whl |
|---|---|
| Size | 109.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
500216ed6ba1f151e803d23cf56f2e1ffc25baff4a61c95566e323ff5e41a992
|
|
BLAKE2b-256 checksum How to use checksums |
97079396e713b6ac9b6b95bd6bd66422e1bcff198d182858289e2842dd59ad42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logSecurity for countrystatecity-translations 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for countrystatecity_translations-3.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.