Skip to main content

django-language-fields

Language and Region Fields for Django apps. Includes all language choices from the IANA Language Subtag Registry.

Included is:

  • LanguageField, a model field

  • RegionField, a model field

Installation

pip install django-language-fields

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, RegionField

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

class MyModel(models.Model):
    ..
    region = RegionField()
    ..

Internally, LanguageField and RegionField are based upon CharField and by default represented as strings.

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-fields 1.0.1

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-fields 1.0.1
File Size Uploaded
django-language-fields-1.0.1.tar.gz 70.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-language-fields 1.0.1
File Interpreter ABI Platform
django_language_fields-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 141.2 kB

Release files / django-language-fields-1.0.1.tar.gz

Download URL django-language-fields-1.0.1.tar.gz
Size 70.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f03292ee7c72b0fecd91f3739ea96bc56d28c2170a35c8702f33b752fc0c2eb4
BLAKE2b-256 checksum
How to use checksums
c700e917dfebcdd32663cbeee46bde477c97aedc981311f19a94bb061ef6b2e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

Release files / django_language_fields-1.0.1-py3-none-any.whl

Download URL django_language_fields-1.0.1-py3-none-any.whl
Size 70.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4129548b78a4c15cc0d12ed21a1d4a403ea56ca3486c319b92a1fbc0cc53f3b8
BLAKE2b-256 checksum
How to use checksums
6701c8a1b377926238f39c820744be9f2bbf8a8de52246f539768ebeb9c03dc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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