Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

fr:Installer WordPress dans votre langue

This article is a ROUGH DRAFT. The author is still working on this document, so please do not edit this without the author's permission. The content within this article may not yet be verified or valid. This information is subject to change.

WordPress utilise l'anglais des États-Unis comme langue par défaut, mais il est conçu pour être utilisé dans toute langue. La communauté WordPress a déjà traduit WordPress dans plusieurs langues. Il y a également des thèmes, des fichiers de traduction et du soutien disponible dans plusieurs langues. Consultez WordPress in Your Language (en anglais) pour en savoir plus.

Pour installer une version traduite de WordPress, vous avez deux choix:

  1. Follow the instructions provided for your language listed at WordPress in Your Language
  2. If specific instructions are not available, follow the instructions below to manually install language files to your Wordpress site.

Manually Installing Language Files

Here are the steps you will need to follow to install an international version of WordPress.

Note: If you make an error in the steps or you do not specify the correct language, WordPress will default back to English. For more help Installing WordPress, see Installing WordPress and FAQ Installation.

  • Download the .mo language file for your language (see WordPress in Your Language for hints on how to find one). The naming convention of the .mo files is based on the ISO-639 language code (e.g. pt for Portuguese) followed by the ISO-3166 country code (e.g. _PT for Portugal or _BR for Brazil). So, the Brazilian Portuguese file would be called pt_BR.mo, and a non-specific Portuges file would be called pt.mo. Complete lists of codes can be found at (country codes) and (language codes). You can use this plugin to automatically download language files stored in the wordpress svn repository wp-native-dashboard.
  • On your site server, create a new folder in your /wp-content OR /wp-includes directory called /languages.
  • Upload the .mo file to the languages folder you just created.

Single-Site Installations

  • Open your wp-config.php file in a text editor and search for:
define ('WPLANG', '');
  • Edit this line according to the .mo file you've just downloaded, e.g. for the Portuguese spoken in Brazil you must add:
define ('WPLANG', 'pt_BR');
  • Note that if the .mo and .po files don't exist for a language code called for in wp-config.php then there is no error message, but the code is still used in language_attributes(). This is useful for those of us whose language is similar enough to en_US not to require translation, but who don't want en-US as the language tag in the blog, instead wanting some other variant of English. For example:
define ('WPLANG', 'en_GB');
  • Once you've added your language code, save the file.
  • Upload the modified wp-config.php file into the WordPress root directory.
  • Open your browser and go to your WordPress site. It should now display in the newly-installed language.

Multi-Site Installations

If you have a site network (Wordpress multisite), the language is set on a per-blog basis through the "Site language" option in the Settings->General subpanel.

You can set the default language for the entire network under the Network Admin->Settings panel ("Default Language").

Additional Customization

If you want to customize the translations displayed on your screen, or add translations for terms that are still displaying in English after installation, you will need to download the .po file corresponding to the .mo language file you installed. Then you will need to translate additional terms and create a new .mo file -- see Translating WordPress for more information.

You may also need to translate a few other files -- see Files For Direct Translation for more information.