[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!