Display country flags or sets of flags of nations where a particular language is spoken
Project description
Language-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.
This module provides tools for display of country flags based on their country code and sets of flags of nations where a particular language is spoken.
Quick start
Add “language_flags” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'language_flags', ]In templates where you want to use language_flags, include the language_flags template tag library:
{% load language_flags_tags %}and include css or min.css in HTML <head>:
<link rel="stylesheet" type="text/css" href="{% static 'css/flags.css' %}">Don’t forget {% load staticfiles %} at the top of your template.
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.
If the LANGUAGE code is equal to existing country code, one flag of related country is displayed.
Acknowledgments
The flag sprite was downloaded from https://www.flag-sprites.com and is derived from the FamFamFam flag icon set at http://www.famfamfam.com/lab/icons/flags/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-country-and-language-flags-0.1.1.tar.gz.
File metadata
- Download URL: django-country-and-language-flags-0.1.1.tar.gz
- Upload date:
- Size: 89.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31fbbb82622ef85354cbcf448f3069311d16e2b7458a0dc43ef2fbb55c9a3020
|
|
| MD5 |
b45c5620a5d8bdd5affe75d268e4a1cb
|
|
| BLAKE2b-256 |
cec668a54a96a8c1ae87e72026dc621c955ffc6042f5f8462426f6bd07e2d552
|
File details
Details for the file django_country_and_language_flags-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_country_and_language_flags-0.1.1-py3-none-any.whl
- Upload date:
- Size: 88.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8fb4c376ff9e6d92131ade954384c61a4443cc03de811db551d3bb3839cb8c
|
|
| MD5 |
8e9a8645e13daf94257d344985bdfdcd
|
|
| BLAKE2b-256 |
3c0a3f6c1cab2bb08de4100e0c836ca1f6dffb9ea93b34a81479091f8ae5f56e
|