Descrizione
EffortLess Multisite Language Switcher is a lightweight plugin designed for WordPress Multisite networks.
It adds a floating globe icon on the frontend, allowing users to quickly switch between subsites β each typically representing a different language or locale.
The plugin detects each site’s locale setting and displays an appropriate flag icon. Flags are automatically mapped using a JSON file and preloaded to enhance performance. Optimized caching ensures fast rendering of the switcher.
This plugin is ideal for multilingual networks using subdirectories or subdomains.
Features:
– Automatically detects and displays flags for each site in the network.
– Uses a floating, always-visible globe icon for an intuitive language switcher.
– Smart caching using WordPress transients for flag mappings and site lists.
– Fully compatible with subdirectory and subdomain multisite setups.
– Optimized for performance with minimal resource usage.
License
This plugin is released under the GPLv2 or later.
You can use it freely in commercial or personal projects.
Donate
If you enjoy using this plugin, please consider supporting its development:
π Buy me a coffee
Installazione
- Upload the plugin folder to the
/wp-content/plugins/
directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Ensure each subsite in your network has the proper
WPLANG
setting (via Settings > General). - (Optional) Customize translations and flag mappings in
/assets/flags/
andlocales_flags.json
.
FAQ
-
Does this plugin work on single-site WordPress installations?
-
No. This plugin is designed exclusively for WordPress Multisite networks.
-
How does it detect the language for each subsite?
-
It uses the
WPLANG
setting from each site’s options. -
Can I customize the flags or locales?
-
Yes! Edit the
assets/flags/locales_flags.json
file to add or modify mappings. -
Are the flags hosted locally?
-
Yes, all flag icons are SVG files stored in the plugin’s
/assets/flags/1x1/
directory.
Recensioni
Contributi e sviluppo
“EffortLess Multisite Language Switcher” Γ¨ un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.
CollaboratoriTraduci “EffortLess Multisite Language Switcher” nella tua lingua.
Ti interessa lo sviluppo?
Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.
Changelog
1.0.14
- Fixed PHPCS errors: Renamed file to class-elmls-plugin.php, added @package tag.
- Conditionalized error_log calls to reduce debug log clutter.
- Justified file_get_contents for local file usage.
1.0.13
- Fixed PHPCS errors: Added docblocks, renamed file to class-elmls-plugin.php, removed short ternaries, and conditionalized debug logs.
- Improved code compliance with WordPress coding standards.
- Optimized flag rendering with explicit logic.
1.0.12
- Optimized performance: Added transient caching for flag URLs and site queries.
- Improved flag rendering speed by simplifying image handling.
- Fixed debug log clutter by conditionalizing error_log calls with WP_DEBUG.
- Enhanced JavaScript for faster UI initialization.
1.0.11
- Fixed issue showing duplicate flags.
0.3.0
- Initial public release.
- Added JSON-based flag mapping.
- Implemented transient caching for site listing.
- Included floating icon rendering logic.