Fandom Developers Wiki
Advertisement

Flags is a snippet providing a way to show flag icons of certain countries in the page's content without having to upload any of them to the wiki itself. It takes flag icons from the Wikia Language Brigade Wiki.

Installation

Importing multiple scripts? This quick guide shows how to combine the imports.
  • For site-wide use, an administrator can add the line below to the wiki's MediaWiki:ImportJS page.
dev:Flags/code.js
  • For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:Flags/code.js',
    ]
});

Configuration

After installing the script, create a template on your wiki and copy the contents of Template:Flags in it. The documentation on how to use the template is provided in the template itself.

For example, if your template page is named "Template:Flags", {{flags}} would produce

Language for the flag not supplied. Please read the documentation on how to use this template

while {{flags|en}} would produce

English
Advertisement