Skip to main content

django-language-field

Language Field for Django apps. Includes all language choices from the IANA Language Subtag Registry.

Included is:

  • LanguageField, a model field

  • LanguageField, a form field (Not yet implemented)

  • regenerate.py, a script to parse the latest language list from IANA

Installation

pip install django-language-field

Basic usage

Add languages to the list of the installed apps in your settings.py file:

INSTALLED_APPS = [
    ...
    'languages',
    ...
]

Then, you can use it like any regular model field:

from languages.fields import LanguageField

class MyModel(models.Model):
    ..
    language = LanguageField()
    ..

Internally, LanguageField is based upon CharField and by default represents the as a string.

As with CharField’s, it is discouraged to use null=True use blank=True if you want to make it a non-required field.

Release files for django-language-field 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-language-field 0.0.3
File Size Uploaded
django-language-field-0.0.3.tar.gz 69.5 kB Details

Release files / django-language-field-0.0.3.tar.gz

Download URL django-language-field-0.0.3.tar.gz
Size 69.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8836a6a1345d8e0f2181ab39a49ced7f810c69eb717948a45daf0779182fe8dc
BLAKE2b-256 checksum
How to use checksums
e5793277312e90af738d26a3ca1efa82cea9a7dbb83772e06f9e1536ae90812e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page