Skip to main content

A simple Django app to display national flags for languages.

Project description

Flags is a simple Django app that helps display national flags. For efficiency, there is just one huge PNG file with all the flags, and individual flags are selected for display using CSS trickery.

Quick start

  1. Add “language_flags” to your INSTALLED_APPS setting like this:

  2. In templates where you want to use language_flags, include the language_flags template tag library:

    {% load language_flags_tags %}
  3. You can use the flags_for_language tag to display a number of flags of nations where a language is spoken. Right now the language can be either English or German:

    {% flags_for_language COUNT LANGUAGE %}

    This will display COUNT flags for language LANGUAGE; the flags will always include the first country listed for LANGUAGE, while the remainder will be randomly selected from the other countries.


The flag sprite was downloaded from and is derived from the FamFamFam flag icon set at

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-language-flags, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django-language-flags-0.1.1.tar.gz (89.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page