Language Flags Module for Magento 2
- Compatibility
- 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
- Hyvä theme
- Hyvä compatible
Description / Language Flags Module for Magento 2
MAGENTO 2 · MULTIPLE MARKETS · NAVIGATION
Help customers choose the right language and market.
Kowal Language Flags
Replace the standard switcher with a clear list of flags and labels. Connect store views, other websites, and external URLs in one navigation location.
Store Views · Websites and URLs · Dropdown or inline
HOW IT WORKS IN PRACTICE
01 · Choose destinations
Configure store views, websites, or custom URLs.
02 · Add flags and labels
Use ready-made icons or your own files.
03 · The customer selects a version
The switcher directs them to the selected language or market.
What does your store gain?
Explore the module features, use cases, and settings.
One switcher for many language scenarios
Kowal_LanguageFlags solves the problem of a hard-to-read language switcher in Magento 2. Instead of the standard list of store view codes, the customer sees an intuitive switcher with flags, language names, and the ability to navigate not only between store views, but also between websites and external stores.
This solution is especially useful when:
- one store supports several language versions;
- different markets operate as separate websites;
- part of the traffic should go to another Magento instance;
- one consistent switcher is needed for different types of target URLs.
What the module provides
- flags for store views;
- flags for other websites in the same Magento instance;
- flags for any URLs, for example to a separate Magento store;
- custom labels and shortened language codes;
- two display variants:
dropdownandinline; - support for the native Magento switcher and a widget.
Business benefits
- customers can identify the language version faster;
- fewer mistakes when selecting a market or language;
- a more professional presentation of a multilingual store;
- the ability to conveniently connect multiple storefronts in one navigation point;
- a shorter implementation path than building a dedicated component from scratch.
Technical benefits
- configuration from the admin panel;
- compatibility with the native Magento mechanism for store view switching;
- one configuration for the native switcher and the widget;
- a default set of ready-made SVG flags copied to
pub/media/language_flags/during installation; - no need to build a separate data table at the start;
- installation via Composer.
Ready-made flag set
The module includes a set of ready-made 24x18 SVG icons that can be automatically copied to pub/media/language_flags/ during bin/magento setup:upgrade.
Available flags:
Flags 1–10
atAustriabeBelgiumbgBulgariacyCyprusczCzech RepublicdeGermanydkDenmarkeeEstoniaesSpaineuEuropean Union
Flags 11–20
fiFinlandfrFrancegrGreecehrCroatiahuHungaryieIrelanditItalyltLithuanialuLuxembourglvLatvia
Flags 21–30
mtMaltanlNetherlandsplPolandptPortugalroRomaniaseSwedensiSloveniaskSlovakiaukUnited KingdomusUnited States
Who it is for
The module is designed for:
- Magento 2 stores operating in multiple markets;
- installations with multiple store views and websites;
- projects where some language versions run outside the main storefront;
- teams that want to implement a clear switcher without rebuilding Magento core.
Example use cases
One Magento, multiple store views
The store has the following versions:
PLENDE
Each one can have a separate flag and label assigned.
One Magento, multiple websites
The store uses separate websites for different countries, for example:
- Poland
- Germany
- France
The module lets you display these websites in the same switcher as local store views.
Distributed storefronts
Some markets operate in another Magento instance or under a different domain. In this situation, Custom URL Flags let you add them to a shared switcher.
Implementation result
The customer gets one consistent language and market switcher, while the administrator can manage it from the Magento configuration without creating additional frontend components.
Appearance and flag selection from the panel
In Stores → Configuration → Kowal → Language Flags, you enable the module and optionally replace the native switcher. You can set dropdown or inline mode, language name visibility, spacing between flags, and icon scale. Names remain available to screen readers even after visible labels are hidden.
You select images from the picker in pub/media/language_flags/ and configure Store View Flags, Website Flags, and Custom URL Flags. You can also insert the switcher as a Language Flags Switcher widget on a CMS page or block.
Requirements and how switching between stores works
The verified package requires PHP ^8.1 || ^8.2 || ^8.3 and Magento modules specified in Composer. Store View uses Magento native switching. Website and custom URL lead directly to the specified address.
Choosing flags, labels, and URLs lets you match navigation to your markets. The module does not translate product content; you prepare language versions in the store configuration and data.
Installation via Composer
Package: kowal/module-language-flags; module: Kowal_LanguageFlags. After configuring access to the Kowal repository, install the package, enable the module, run the Magento upgrade, and clear the cache. For production mode, include compilation and static content deployment according to your store process.
From configuration to result
1. Choose destinations
Configure store views, websites, or custom URLs.
2. Add flags and labels
Use ready-made icons or your own files.
3. The customer selects a version
The switcher directs them to the selected language or market.
Shared navigation for multiple storefronts
Example: the Polish version operates as a Store View, the German market as a separate website, and the UK store under a different domain.
You can display all three destinations in one switcher. Store View uses the native Magento process, while websites and custom URLs work as direct links.
Organize language version and market selection
Want to adapt the module to your store? Ask about implementing Kowal Language Flags and discuss the configuration or required extensions.
More Information
| Hyvä theme | Hyvä compatible |
|---|---|
| Theme compatibility | Hyvä, Luma / Blank, KOWAL |
Module Installation Instructions
# You will receive access credentials (customer email and license token) by email after purchase.
# They are also available in the customer panel after logging in to kowal.store.
# Replace TWOJ_EMAIL_KLIENTA with the account email address and TWOJ_TOKEN with the token you received.
composer config repositories.kowal composer https://repo.kowal.store
composer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'
composer require kowal/module-language-flags
bin/magento module:enable Kowal_LanguageFlags
bin/magento setup:upgrade
bin/magento cache:flush
Installation and configuration guide for the Magento 2 Language Flags module
Installation
Installation via Composer
You will receive Composer repository access credentials (customer email address and license token) by email after purchase. They are also available in the customer panel after logging in to kowal.store. Replace TWOJ_EMAIL_KLIENTA with your account email address and TWOJ_TOKEN with the token you received. Run the commands in the Magento root directory.
composer config repositories.kowal composer https://repo.kowal.store
composer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'
composer require kowal/module-language-flags
bin/magento module:enable Kowal_LanguageFlags
bin/magento setup:upgrade
bin/magento cache:flushAdditional commands for production mode
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flushConfiguration location
Admin panel:
Stores > Configuration > Kowal > Language FlagsWidget for the CMS editor
The module provides a widget:
Language Flags SwitcherIt can be inserted in:
Content > BlocksContent > Pages
Path in the editor:
Edit > Insert Widget > Language Flags SwitcherThe widget supports:
dropdownorinlinemode;- enabling or hiding language names;
- an additional CSS class.
Default flags
During bin/magento setup:upgrade, the module copies default SVG files from:
view/frontend/web/images/flags/to the directory:
pub/media/language_flags/Only missing files are copied, without overwriting flags that already exist.
General configuration
The General Settings section contains fields that control how the module works.
Enable Module
Path:
language_flags/general/enabledMeaning:
Yesenables the module;Nodisables the module on the frontend.
Replace Native Store View Switcher
Path:
language_flags/general/native_enabledMeaning:
Yesreplaces the native Magento switcher with the version with flags;Noleaves the native switcher unchanged.
Native Display Mode
Path:
language_flags/general/native_display_modeAvailable options:
dropdowninline
Meaning:
dropdownshows the current item and a dropdown list of the remaining items;inlineshows all flags immediately in one line.
Show Language Names
Path:
language_flags/general/show_labelsMeaning:
Yesshows language names next to flags;Nohides names in the main view, but leaves them available for accessibility.
Fallback to Store View Name
Path:
language_flags/general/fallback_to_store_nameMeaning:
Yesuses the store view name whenLabelhas not been filled in;Nouses the store view code in uppercase.
Inline Flag Gap (px)
Path:
language_flags/general/inline_gapMeaning:
- sets the spacing between switcher elements in
inlinemode; - the value is calculated in pixels;
- the default value is
8.
Icon Scale (%)
Path:
language_flags/general/icon_scale_percentMeaning:
100keeps the original image dimensions;- a lower value reduces the width and height proportionally;
- scales flags in both rendering modes.
Flag table configuration
The module supports three separate sets of entries:
Store View FlagsWebsite FlagsCustom URL Flags
On the frontend, entries are combined into one set of switcher elements.
Store View Flags
Path:
language_flags/general/flag_configPurpose:
Flag configuration for store views handled by the native Magento mechanism.
Form columns
Store Code
Selects a store view from the Magento list.
Meaning:
- assigns a flag to a specific store view;
- uses the native Magento store view switching mechanism.
Flag File
Path to the flag file selected from the built-in file picker.
Meaning:
- defines the image displayed on the frontend;
- can be saved as
pl.svgorlanguage_flags/pl.svg; - relative paths are resolved from the directory:
pub/media/language_flags/Label
Full language or market name, for example:
PolskiEnglishDeutsch
Meaning:
- is shown next to the flag when
Show Language Namesis enabled; - also serves as assistive text for accessibility.
Short Label
Shortened label, for example:
PLENDE
Meaning:
- is used in a more compact view;
- can be used instead of the full name.
Website Flags
Path:
language_flags/general/website_flag_configPurpose:
Configuration of flags that point to other websites in the same Magento instance.
How it works
- clicking does not perform the native
store switch post; - the entry is rendered as a regular link to the target website base URL;
- the current website is not added as a separate option.
Form columns
Website
Selects a Magento website from the list.
Meaning:
- defines the target website for the entry;
- is used to retrieve the base address of the target storefront.
Flag File
Works the same way as in Store View Flags.
Label
Full label displayed on the frontend.
If left empty:
- the module will use the website name.
Short Label
Shortened label, for example:
UKDEFR
If left empty:
- the module will use the website code in uppercase.
Custom URL Flags
Path:
language_flags/general/custom_url_flag_configPurpose:
Configuration of flags that point to any URLs, for example to another Magento instance or an external store.
Form columns
URL
Target link address.
Examples:
https://example.de/https://en.example.com/https://shop.example.cz/
Meaning:
- the entry is rendered as a regular
hreflink; - it does not use the native Magento store switch mechanism.
Flag File
Works the same way as in the other tables.
Label
Full label displayed on the frontend.
If left empty:
- the module will try to use the host from the URL.
Short Label
Shortened label for the compact variant.
If left empty:
- the module will build an abbreviation based on the host;
- if this is not possible, it will use the
URLvalue.
Preparing flag files
Recommended location:
pub/media/language_flags/Recommended formats:
svgpng
Example file names:
pl.svgen.svgde.svgfr.svgBasic configuration flow
- Enable the module with
Enable Module. - Decide whether you want to replace the native Magento switcher.
- Set
Native Display Mode. - Add flag files to
pub/media/language_flags/. - Fill in
Store View Flags. - Add optional entries in
Website Flags. - Add optional entries in
Custom URL Flags. - Save the configuration and clear the cache.
Useful CLI commands
bin/magento module:status Kowal_LanguageFlags
bin/magento cache:clean
bin/magento cache:flush