Language Switcher, Flag Selector: setup and help
Quick start
- Upload and install mprflagselector through Module Manager.
- Activate at least two languages for the current shop in PrestaShop.
- Click Configure for Flag Language Selector.
- Choose Show ISO label in toggle and Show language names in dropdown, then Save.
- Check displayNav2, or displayNav before 1.7, and the separate mobile hook in your theme.
- Switch language on a translated product page and verify both the destination page and mobile selector.
Requires PHP 7.1 or later.
Setup manual
Install and prepare languages
Upload and install the mprflagselector ZIP in Modules > Module Manager, then open Configure for Flag Language Selector. Use the corresponding module upload page on older PrestaShop versions.
Create and activate your shop languages in PrestaShop. On modern versions, use International > Localization > Languages. You need at least two active languages assigned to the current shop for a selector to appear. The module does not create translations.
Requires PHP 7.1 or later.
Configure the display
| Setting | Default | What it does |
|---|---|---|
| Show ISO label in toggle | No | Adds the current language code, such as EN or DE, beside the closed flag button. Enable if a flag alone is unclear. |
| Show language names in dropdown | Yes | Shows the language name beside each flag. Disable for a shorter dropdown. |
Click Save.
Place the selectors
The desktop dropdown uses displayNav2 on PrestaShop 1.7 and newer, or displayNav on earlier versions. A custom theme must render the applicable hook. For example:
{hook h='displayNav2'}
The mobile selector uses a separate hook. Add it to your mobile menu or language panel if your theme does not already render it:
{hook h='displayMobileLanguageSelector'}
The mobile output is a select element. Changing its value opens the selected language URL. The module also registers actionFrontControllerSetMedia for its assets.
The stylesheet hides #_desktop_ps_languageselector. Inspect custom headers for different native wrappers or duplicated language blocks.
Understand language links and flags
The dropdown shows active languages for the current shop. It uses the page’s alternative-language links when available and otherwise uses PrestaShop’s language links. It preserves query parameters and fragments, including id_lang needed when URL rewriting is disabled.
For PrestaShop’s best-seller, new-product and price-drop pages, the selector can use the target language’s translated URL. On listings integrated with compatible MPR Filter Revolution versions, it can translate the filter path. When a listing supports MPR pagination links, it preserves the translated page keyword and page number, or a page query parameter without URL rewriting. These listing adjustments do not apply to pages supplied by modules.
Switching languages does not translate missing content. Cart behavior continues through PrestaShop's normal language switch.
Bundled SVG flags are in /modules/mprflagselector/views/img/flags/. The mapping includes:
en: gb cs: cz sv: se da: dk el: gr
ja: jp zh: cn ko: kr uk: ua
An option can still appear without an image if no corresponding SVG exists. There is no custom flag uploader in the settings form.
Customize the theme
Use .mprflag-dropdown, .mprflag-dropdown__toggle, .mprflag-dropdown__menu, .mprflag-dropdown__option, and .mprflag-dropdown__option--active in your theme stylesheet.
.mprflag-dropdown__toggle { padding: 4px 7px; }
.mprflag-dropdown__option--active { font-weight: 600; }
For markup changes, use the theme override path:
themes/your-theme/modules/mprflagselector/views/templates/hook/flag-selector.tpl
Verify and troubleshoot
- Open a translated product page and change language from the header.
- Check the destination language and page.
- Repeat on a category and, if applicable, a filtered or paginated listing.
- Test the mobile selector separately.
- Test with your shop's actual URL rewriting setting.
If no selector appears, check that two languages are active in the current shop and that the correct hook renders. If a flag is missing, check the language ISO code and bundled SVG mapping. If a link goes to a fallback page, inspect the URLs provided by PrestaShop or the controller. If links duplicate a filter or page path, check the compatible MPR listing integration and clear theme caches after template changes.
Uninstall
Uninstall through Module Manager. The module removes its settings and admin menu. Your PrestaShop languages and translations remain separately managed. Remove any manually added hook calls, CSS, or template overrides that are no longer needed.
Screenshots







Questions
2
Does Flag Selector translate content or choose a language from visitor location?
No. It lists the active languages assigned to the current shop and creates links to their existing localized pages. It does not translate catalogue content or choose a language by geolocation. Prepare your translations and language assignments in PrestaShop before using the selector.
Will Flag Selector affect storefront performance?
The selector uses the shop's language data, bundled SVG flags and local stylesheet and JavaScript assets. Its normal rendering does not call an external translation or location service. Measure page loading with your actual header and language setup.
Known Issues
7
Visitors could lose access to language switching
Administration labels remained in English
Two language selectors appeared on PrestaShop 9
Administration translations were damaged
Standard page language links used incorrect destinations
Language selector settings failed to open
Language links on module pages were incorrect
Feature Requests
4
Implemented
Localized filter and pagination URLs when switching language
Flag language selector
Context-aware language links
One-click updates
Changelog
v2.2.222026-09-15
- AddedOwn mobile language selector — kill PS native, server-side correct URLs
- Addedcomplete FR/DE/ES/IT/PL translations
- FixedCanonicalize core page language links
- FixedRestore flag selector config page
Older releases
v2.2.212026-07-20
- Canonicalized native PrestaShop page aliases when building language switcher URLs.
- Kept translated filter paths and localized pagination keywords when switching language.
- Released the updated package metadata for version 2.2.21.
v2.2.182026-07-07
- Addedshared admin menu, license, update and integrity panels.
- AddedConfigTable-backed settings for ISO label and language-name display.
- Addedcomplete FR/DE/ES/IT/PL translations.
v1.1.02026-04-20
- Addedthe flag language selector for PrestaShop storefront navigation.
- Addedlocalized URL support for multilingual shops.
Demo
Test the full module
- Ready demo shop Explore a ready demo shop in your browser.
- No registration No account, email or store domain needed.
By opening this demo you accept the demo terms and the privacy policy.