Change MediaWiki Interface Language: Step-by-Step
This guide shows you how to change the interface language in MediaWiki—the language of menus, buttons, and system messages—for individual users or for the entire wiki. You’ll need administrator access to change the site-wide default; for personal changes, a logged-in account is sufficient.
What You’ll Need
- Access to your MediaWiki installation’s files (via FTP or file manager) if you need to change the site-wide default.
- Administrator (sysop) rights on the wiki if you want to change settings via
LocalSettings.php. - A list of supported language codes (e.g.,
en,fr,de,es,ja). You can find them in thelanguagesfolder of your MediaWiki installation or online.
Step-by-Step
For Individual Users (Logged-In)
- Log in to your MediaWiki account.
- Click on Preferences in the top-right corner (next to your username).
- In the User profile tab, find the Language section.
- Select your preferred language from the dropdown menu. The list shows language names in their own language (e.g., “Deutsch� for German).
- Click Save at the bottom of the page. The interface will now display in your chosen language.
For Anonymous Visitors (Not Logged In)
- Anonymous users can change the interface language temporarily by adding
?uselang=xxto the URL, wherexxis the language code (e.g.,?uselang=fr). - This change lasts only for the current session; closing the browser reverts to the default.
Site-Wide Default (Requires File Access)
- Open the
LocalSettings.phpfile in the root directory of your MediaWiki installation using a text editor. - Add or modify the line:
$wgLanguageCode = "fr";(replacefrwith your desired language code). - Save the file and upload it back to the server if you edited locally.
- Clear any server-side caches (e.g., opcache, Memcached) if you use them.
- Refresh your wiki’s main page. The interface should now appear in the new language for all visitors.
Using the Language Selector Extension (Optional)
- If you want a visible language selector on every page, install the UniversalLanguageSelector extension.
- Download the extension from the MediaWiki extension repository and place it in the
extensionsfolder. - Add
wfLoadExtension( 'UniversalLanguageSelector' );toLocalSettings.php. - Save and reload. A language icon will appear in the personal tools area, allowing users to switch languages quickly.
Common Mistakes
- Using the wrong language code: Codes are case-sensitive and follow ISO 639. For example,
enfor English,defor German,zhfor Chinese. Usingengorgerwill not work. - Editing the wrong file: Some users accidentally edit
LocalSettings.phpin a backup folder or the default MediaWiki directory instead of the active installation. - Forgetting to clear caches: Browser or server caches can keep showing the old language for a while.
- Changing the language but not the content: The interface language is separate from page content. Changing the interface does not translate articles.
Tips
- Test the change on a staging site first if you’re altering the site-wide default.
- Use the
?uselang=parameter to preview a language before committing to it site-wide. - If you’re running a multilingual wiki, consider installing the Translate extension to manage content translation alongside the interface.
- Keep a backup of
LocalSettings.phpbefore making changes.
Troubleshooting
- Interface still in English after changing
$wgLanguageCode: Check that you edited the correctLocalSettings.php. Verify the line is not commented out (no#at the start). Clear the server cache and your browser cache. - Language dropdown in Preferences is missing: This can happen if the
UniversalLanguageSelectorextension is not installed, but the default preferences should still show a language field. If it’s missing, check that your MediaWiki version is up to date. - Error “Language code not supported�: Ensure the language code is valid. Check the
languagesfolder for available files (e.g.,MessagesFr.phpfor French). - Some interface messages remain in English: Not all messages are translated in every language. This is normal; you can contribute translations on translatewiki.net.
- After changing the language, the wiki breaks: This usually indicates a syntax error in
LocalSettings.php. Revert to the backup and re-apply changes carefully.
Frequently Asked Questions
Can I set different languages for different users?
Yes, each logged-in user can set their own language in their preferences, overriding the site default.
Will changing the interface language translate the content of my pages?
No. The interface language only affects system messages, menus, and buttons. Page content remains as written. To translate content, you need the Translate extension or manual translation.
How do I find the language code for my language?
Language codes are ISO 639-1 two-letter codes (e.g., en, fr, de). For less common languages, check the languages folder in your MediaWiki installation for the corresponding Messages*.php file.
What if my language is not listed in the Preferences dropdown?
This usually means the language is not installed. You can download the language file from the MediaWiki repository and place it in the languages folder, then re-run the installer or update the configuration.
Can I change the language without editing files?
Yes, for individual users, you can use the Preferences page. For site-wide changes, you need file access or the use of the ?uselang= parameter for temporary changes.
Does the language change affect the URL structure?
No, the interface language does not change the URLs. If you want language-specific URLs, you need to set up a multilingual wiki with separate namespaces or subdomains.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.