Automatically sets up the WP language environment based on first part of url. Will setup XML lang attribute + $locale variable.
As of April 2026, YD Setup Locale is a WordPress i18n plugin with 10 active installations and a 0/5 rating0. It has been downloaded 2.8K+ times in total. Requires WordPress 2.0.0+ and PHP false+. Available on WordPress.org since 2009. Last updated 16 years ago — may have compatibility concerns. Top alternative: Loco Translate.
This very simple WordPress plugin automatically sets up the WP language environment based on the first part of the url of any page.
It will automatically setup the right XML header lang attribute + the internal WordPress $locale variable that is used to load the right language files for i18n and l10n (.po, .mo).
Your blog URL structure should always begin with an official two-letter langage code, for example:
Please use only lower-case codes.
Pages that don’t comply to this URL scheme will still get your blog’s default locale setting, as configured in your wp-config.php file.
Sometimes you need to rename or copy some of your po/mo files, for example French language PO files are us…
| WordPress | 2.0.0+ requiredTested up to 2.7.1 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.