[fr] A tester absolument si vous devez mettre en place un site multilingue: le plugin WPML pour WordPress.
I’ve been wanting to play with the WPML WordPress plugin for a while now, and I finally took the plunge today and updated my professional site to the latest version of WordPress, as well as WPML. (Sadly, the content still needs a major overhaul.)
Until now, I had built it using two separate WordPress installations, one in English, one in French, linked together by my quick-and-dirty plugin Bunny’s Language Linker (which, in the light of today’s experiment, I will be retiring from rather inactive development — Basic Bilingual remains, though, and still very much makes sense).
Here’s a summary of what I did:
- backed up my database
- upgraded both WordPress blogs to the latest version and exported their content
- removed the automatic language redirection based on browser language preferences to make sure it wouldn’t interfere (I want to find a way to insert it back in, help appreciated)
- added and activated the WPML plugin on the English installation
- went through the settings after activating advanced mode
- translated widget text and site tagline
- manually imported content from the French site (import failed due to PHP on my server not being compiled with ctype_digit()), but it was only a dozen pages — it’s easy to specify language and of which English page a new one is a translation of, if any)
I did encounter some grief:
- when selecting the “different languages in directories” I kept getting an error message which didn’t make much sense to me; tip: if that happens, make sure that your site and pages all work fine (in my case, I had to reset permalink structure because it had got lost somewhere on the way — even though the settings didn’t change)
- I’m using a theme with an existing .mo file for French, so I selected that option (to figure out what the textdomain is, look through a theme file to see what the second argument to the gettext calls is — they look like
__("Text here", "text domain here")) but it seems that all the strings for my theme still appear in the “string translation” pane
- initially the strings for my widgets and site tagline weren’t appearing in the “string translation” pane — you have to click the “Save options and rescan strings” button for that, even if you haven’t changed any settings (that was not exactly obvious to me)
Here’s what I still need to fix:
- the rewrite rules are set to hide the “language directory” part of the URL when browsing the site in the default language — I want to change this as explained in this forum post
- reimplement automatic language detection
- set up a custom language switcher that looks more like “Français | English” somewhere at the top right of the page
And honestly, once that is settle, WPML is as close as it gets to my dream multilingual plugin for WordPress!
- Bunny's Language Linker: New WordPress Plugin [en] (2007)
- Basic Bilingual 1.0 Plugin for WordPress: Blog in More Than One Language! [en] (2013)
- Requirements for a Multilingual WordPress Plugin [en] (2006)
- Basic Bilingual [en] (2009)
- MediaWiki [en] (2005)
- Call to WordPress Plugin Developers [en] (2005)
- Browser Language Detection and Redirection [en] (2007)
- Basic Bilingual 0.3 for Multilingual Blogging [en] (2007)
- Multilingual Dragon [en] (2002)
- Ridding WordPress Plugins of Template Tags [en] (2007)
2 thoughts on “WPML to Make Your WordPress Site Multilingual [en]”
ca m’intéresse parce que jusqu’à maintenant, j’étais plutôt partie sur Drupal pour les sites vraiment multilingues.
Petite question 🙂 est ce qu’on peut vraiment TOUT traduire ?
– les bases d’url pour les catégories et les tags ?
– les slugs des termes (catégories, tags) ?
– les descriptions des termes de la taxonomie ?
If you’re interested in a tool to easily translate WordPress themes, have a look at the online localization platform https://poeditor.com/ It’s even got a plug-in you can use with it to integrate its API to your WordPress so that you save more time with the file management process. You can find it here: http://wordpress.org/extend/plugins/poeditor/