Skip to content

Flags

Provides flag icons for countries and languages, with a simple API for mapping country codes and language codes to their corresponding flag icons using CSS sprites.

For a full description of the module, visit the project page.

Submit bug reports and feature suggestions, or track changes in the issue queue.

Table of contents

  • Requirements
  • Recommended modules
  • Installation
  • Configuration
  • Submodules
  • Maintainers

Requirements

This module requires no modules outside of Drupal core for basic functionality. However, individual submodules have their own requirements (see Submodules below).

  • Select Icons - Display flag icons in form select widgets.
  • Country - Provides a country field type. Required by the Flags Country submodule.
  • Language Field - Provides a language field type. Required by the Flags Language Field submodule.

Installation

Install as you would normally install a contributed Drupal module. Visit https://www.drupal.org/docs/extending-drupal/installing-modules for further information.

Configuration

  1. After installing, enable the main Flags module and one or more submodules depending on your needs.
  2. Navigate to Administration > Structure > Content types > [type]

    Manage display to select a flag formatter for country or language fields.

  3. Optionally enable the Flags UI submodule to customize flag mappings at Administration > Configuration > Regional and language > Flags.
  4. The "Administer flag mapping" permission controls access to the flag mapping administration pages.

Submodules

  • Flags Country (flags_country) - Integrates flags with the Country module. Provides a "Country with flag" field formatter and a country select widget with flag icons (requires Select Icons).

  • Flags Language (flags_language) - Integrates flags with Drupal core's language field. Provides a "Language with flag" field formatter and a language select widget with flag icons. Also adds flags to the language switcher block.

  • Flags Language Field (flags_languagefield) - Integrates flags with the Language Field module. Provides a "Language with flag" field formatter and widget.

  • Flags UI (flags_ui) - Provides an administration interface for customizing country-to-flag and language-to-flag mappings.

Maintainers

  • SiliconMind - https://www.drupal.org/u/siliconmind
  • vlad.dancer - https://www.drupal.org/u/vladdancer
  • matsbla - https://www.drupal.org/u/matsbla
  • batigolix - https://www.drupal.org/u/batigolix

Sponsored by: