ZdMultilang est un plugin pour Wordpress permettant de bloguer dans plusieurs langues. Celui ci permet de configurer autant de langues que vous le voulez et de traduire les articles/catégories/tags dans ces langues.
Par la suite, les utilisateurs peuvent choisir dans quelle langue lire le blog/article via un widget disponible, ou directement dans les posts (via une option configurable)
1. Installation
Pour installer le plugin, il suffit de déposer les fichiers dans le dossier wp-content et de l’activer comme n’importe quel autre plugin.
2. Utilisation
Afin d’utiliser le plugin, il faut avant tout paramétrer les langues disponibles. Pour ce faire, il vous faudra aller dans l’onglet Langues de votre tableau de bord, puis dans Langues, comme ci-dessous:

Une fois là, vous n’avez plus qu’a ajouter les langues en remplissant les champs prévus à cet effet.
- Nom de la langue est utilisé pour afficher en clair la langue (de manière compréhensible pour un humain).
- Code de la langue est le code international utilisé pour traduire votre texte, vous trouverez la liste des codes disponibles pour Wordpress ici. Ce code sera donc utilisé pour traduire les articles, mais aussi l’interface si le fichier de traduction est présent (comme mentionné sur la page précédente). Il sert aussi à afficher le drapeau de langue.
- Permalien est une valeur qui est nécessaire, en effet, ne pas remplir cette valeur rendra votre blog légèrement… non-fonctionnel. En effet, c’est a partir de ces valeurs que les règles de d’écriture d’url sont générées (rewrite_rules). Cette valeur peux contenir n’importe quoi (par exemple fr ou français ou french). Elle est utilisée pour créer les url de type /en/zdstats ou /english/zdstats, etc…
- Langue par défaut permet de dire au plug-in dans quelle langue vous écrivez “normalement” via l’interface Wordpress. Notez qu’il ne peut y avoir qu’une seule langue par défaut.
Une fois les langues définies, vous allez pouvoir commencer à traduire les éléments de votre blog.
Traduction des termes (tags, categories et categories de liens).
Pour traduire ces éléments, dirigez vous vers l’onglet Traductions puis choisissez le type de terme que vous désirez traduire et enfin cliquez sur le nom original, vous serez amenés a une page comme celle-ci :

Traduction d’articles/pages.
Pour traduire un article (ou une page), il vous faudra aller sur l’onglet Articles & Pages, puis cliquer sur le lien correspondant a ce que vous voulez traduire, voir ci-dessous :

Ces liens peuvent avoir deux états, Traduire, qui signifie que l’article n’as pas encore de traduction, ou Editer qui signifie que l’article possède déjà une version localisée.
Cliquer sur le titre original de l’article vous amènera directement à la page d’édition de l’article original.
Lors de la traduction d’un article, vous pourrez voir l’article original au dessus de votre zone de saisie, et que cette même zone utilise l’éditeur visuel de Wordpress.
3. Options
Il y a quelques options disponibles avec ce plugin, elle vous permettront notamment de modifier le comportement de votre blog.
- Langue par défaut voir la description au chapitre 2.
- Affiche le selecteur de langue dans les articles vous permet de placer dans chaque article un lien vers les langues disponibles. En mettant cette option à Masqué, vous ne verrez donc pas ce sélecteur.
- Position du selecteur de langue définie l’emplacement du selecteur au niveau du contenu de l’article (Haut ou Bas).
- Affiche les noms de langues dans le selecteur affiche ou non le nom de la langue dans ce selecteur
- Affiche les drapeaux dans le selecteur affiche ou non le drapeau associé a la langue dans le selecteur. Vous pouvez évidement combiné les 2 variables en fonction de vos besoins.
- Classe CSS du selecteur de langue, qui comme son nom l’indique est le nom de la classe CSS à utiliser pour l’affichage du selecteur.
Par exemple, sur Zen-Dreams j’ai paramétré le selecteur comme étant visible, en haut des articles et ne pas afficher le nom des langues.

Un widget est aussi disponible et remplis la même fonction que le selecteur.
4. F.A.Q
Comment savoir quel code de langue utiliser ?
Le code langue est celui qui est utilisé par Wordpress pour la locale de votre blog. Par exemple le code pour l’anglais est en_US et le code pour le Français est fr_FR, fr_BE pour le Belge, etc…
Puis-je avoir plusieurs permalien identiques ?
Non, le permalien est ce qui permet de faire la translation vers une langue. C’est pourquoi les permaliens doivent être uniques. Toutefois, le permalien est limité a 50 caractères, ce qui vous laisse quand même de la marge.
5. Téléchargement
Vous pouvez télécharger la dernière version ici ou aussi sur le site officiel de Wordpress.
6. Screencast
ZdMultilang presentation Video from Anthony PETITBOIS on Vimeo.

(7 votes)









68 Commentaires
dommage de ne pas disposer d’une F.A.Q digne de se bon ni d’aucune explication supplémentaires á revoir… :-)
Jorge, j’avoue ne pas encore avoir eu le temps de faire une FAQ mais j’y travaille, toutefois, je penses que le plugin est relativement simple à utiliser.
Hello Anthony.
First I have to say that I this plugin alot :)
I just have one issue with it. The flags close to the language appear twice. You can take a look at my website. Please help me resolve this as soon as possible.
Thanks alot :)
Ljesh,
I don’t see it twice, I only see the flag once for each language.
when I try to add a language named with non-latin characters, it’s shown as ????????
I have solved my problem by setting “LanguageName” column collation to ‘utf8_unicode_ci’
bonjour anthony
Ce plugin est très intéressant cependant lorsque je l’active l’administration passe en anglais.
Une idée?
Serge, oui, c’est normal, pour qu’il passe en Francais, il faut définir la langue fr_FR et l’etablir comme langue par défaut.
I am using wordpress 2.6 and your latest ZdMultilang plugin. A few strange things happen:
I am seeing two flags.
The Dutch flag is not showing, although I added the language with the correct Language code (nl_NL)
English is the ddeault language, but when I press the Dutch language in the widget, I do not see the dutch translation of the post, although I translated that post.
I see also that the English and Dutch link in the widget point to the same URL.
I do not have permalinks enabled in the wordpress admin, is that a must? I enabled it in the zdmultilang correctly
Impulse, to display the flag when switching the language, you have to check that the filename in the flags folder is correct, I’m pretty sure it’s not the case. I was thinking this week that I had to add this problem into the F.A.Q.
Even if you don’t use permalinks, you have to fill this value as it will be passed as an argument to the query string, for example : http://www.zen-dreams.com/?p=174&lang=en
If you didn’t fill this value, you’ll have to update the languages to take this value into account.
This plugin looks great!
Feature Request:
Either as an option or by default, edit the query so that when viewing a specific language context (like site/fr/) ONLY posts with a translation in that language are shown.
For example, on http://www.zen-dreams.com/en/ posts without an english translation are still shown but in french. This is okay if you translate most of your posts (people can just skip the other ones), but makes the plugin useless for people who want to translate as much of the site as possible, but don’t have time to do all (or most) of the posts. It would be great to be able to offer a page and RSS feed of only the posts on your site that are in the correct laguage, even if the traffic is lower, especially if you want to translate into a lot of languages.
I’m pretty biased, because we do some crazy translation into theoretically all languages at the site I run (http://globalvoicesonline.org), but I think it owuld be useful for a lot of people.
That said, it would be pretty damn hard to get it to work in all parts of wordpress, especially with other plugins conflicting all over the place, i wouldn’t even know where to start. But if your’e ever thinking of adding something, it would be a great addition :)
Jeremy,
That’s a good idea to filter on what’s been translated and indeed it’s quite easy to do, do next version will give more options (I’ll also add an option for a text to says it’s not been translated yet).
Just to let you know that there are separate feeds available for each language, for example http://www.zen-dreams.com/fr/feed or http://www.zen-dreams.com/en/feed
And finally, yes the only problem with the translations are plugins that are not multilingual ready (as long as they use the i18n feature of wordress), zdmultilang will switch language as it switches wordpress locale on the fly
hello Anthony,
Thank you for your quick reply. Unfortunately it still does not work. I still get two flags with each language. I added the French language and the French flag appears twice. Only nl_NL does not work, no flags at all. Although this is the right language code and the nl.png file is present.
Also the translation of a post is not working. I made a French translation and Dutch translation on the post but it still shows the English version.
Also interesting to see that the widget is not working when going to the homepage mode http://ifolio.idfact.net the widget links all languages to http://ifolio.idfact.net/index.php
If you click on a post, suddenly the links in the widget are linking correctly to
http://ifolio.idfact.net/index.php?p=400&lang=fr
Impulse, the flag name for NL must be : wp-content/plugins/zdmultilang/flags/nl_NL.png
Regarding the widget problem it must be linked to the fact you do not use permalinks.
About the flag appearing twice i don’t really undestands what happens it’s generated twice. I’ll look into the code to understand why.
Yes! The Dutch flags appears by renaming nl.png to nl_NL.png thank you very much!
Hi,
I would love to use your plugin, but i see a problem that is common to multi-language tools for WP: SEO optimization.
See, your own website shows the same content on http://www.zen-dreams.com/ AND http://www.zen-dreams.com/en/ , and this goes contrary to Google’s recomendations for webmasters.
Also, a post is not found under http://www.zen-dreams.com/postdateorname, but only under http://www.zen-dreams.com//languagecode/postnameordate. That can be counter-intuitive for some reader.
Please allow me to suggest what i would think is the best SEO setup:
Website under default language found at http://website only, and in other languages found under http://website/languagecode.
Posts under deafult language found under http://website/postnameordate ONLY - and never under http://website/defaultlanguagecode/postnameordate , so as to prevent duplicate content (for Google). This is specially for clicking the flag to go back to the default language!
And obviously translated posts found at http://website/languagecode/postnameordate .
It seems natural to me that the multi-language system should be completely tranparent to readers of the deafult language, since most posts will be in that language. Only readers clicking a flag should be aware of a language code in the URL.
Thank you for rpoviding such a nice plugin!
Eduardo,
Yes, first page is displayed as default language. I never worked this plugin as a SEO killer tool, just a tool used to translate your blog. that said, some of the things you think about the plugin are not true, as my first concern was not to break any previous permalink. Therefore, any page available as http://website/language_code/postpage is also available with ‘default language’ via http://website/postpage
You can have a try with http://www.zen-dreams.com/zdmultilang
I understand very well you point of view, but when I come on a website, I like to see language code inside the url to make sure I’ll understand the page prior to click on a link.
For example, this website, 2 weeks ago was in French by default and most users never left any comment because it was not displayed in English. Only those arriving on the site via the /en/ link had left comments.
Anthony, I must agree with Eduardo regarding the SEO.
First of all I say that your plugin rocks, it does the things how they should be done.
The only think I really don’t like is the way the plugin manage the default language. I think that when defining the default language, every link should be domainname.tld/slug, domainname.tld/en/slug, etc.
when I switch from english to french, I notice that the url become domainname.tld///slug
Ok, I must admit that it should be an option on how the default language is generated. I will include this options in next release.
thanks to both of you for your comments :)
You’re great man!
Can’t wait to see the new release. We’re hiring some guyz and gals to translate our work from italian to whatever possibile.
And my wife is waiting for the new release too, because her cooking blog is hungry of non-italian users ;)
Hope to see new version soon. Feel free to ask if you need help.
Again me, but you know, I love your plugin, so I started using it very hard.
I’ve done the following: I copied the whole english post to translate it to italian. I also copied an image that was in the post, unfortunately the image was not transferred to the translated post. Just the text.
PS: I’ve done this on an adult oriented site, so.. no URL for now. If needed drop me a line.
Ferlo, that’s strange for the image as I do this all the time. Is the url in text editor correct ?
Next release should be published within a week or two, depending on the time I manage to get for it, and also time that my daughters leave me to work on it ;)
ehehehe… my daughters (twins) are here at office with me, I know the problem :)
my fault. I discovered the problem. I was importing posts using wp-o-matic that use its own cache. the path to the image was wrong because of the /en /fr etc.
it’s ok now.
Great !
I Hope the plugin will satisfy your needs, and next version will even more ;)
It seems that plugin is not working with cyrillic langugage.
Anyone manged to use this plugin it showing ???????? if I translate posts.
Ok I have found what is the problem.
Tables columns are not utf. This is the right create function:
function zd_multilang_install() {
global $ZdmlCache;
global $wpdb;
$termtrans=$wpdb->prefix.’zd_ml_termtrans’;
$langs=$wpdb->prefix.’zd_ml_langs’;
$posttrans=$wpdb->prefix.’zd_ml_trans’;
if($wpdb->get_var(”SHOW TABLES LIKE ‘$langs’”) != $langs) {
$sql=”CREATE TABLE $langs (
LanguageID varchar(5) NOT NULL,
LanguageName varchar(100) character set utf8 NOT NULL,
LangPermalink varchar(50) NOT NULL,
primary key (LanguageID),
UNIQUE (LangPermalink)
);”;
require_once(ABSPATH . ‘wp-admin/includes/upgrade.php’);
dbDelta($sql);
}
if($wpdb->get_var(”SHOW TABLES LIKE ‘$termtrans’”) != $termtrans) {
$sql=”CREATE TABLE $termtrans (
term_id varchar(5) NOT NULL,
LanguageID varchar(5) NOT NULL,
name varchar(255) character set utf8 NOT NULL,
primary key (term_id,LanguageID)
);”;
require_once(ABSPATH . ‘wp-admin/includes/upgrade.php’);
dbDelta($sql);
}
if($wpdb->get_var(”SHOW TABLES LIKE ‘$posttrans’”) != $posttrans) {
$sql=”CREATE TABLE $posttrans (
ID BIGINT(20) NOT NULL,
LanguageID varchar(5),
post_content longtext character set utf8,
post_title text character set utf8 NOT NULL,
primary key (ID, LanguageID)
);”;
require_once(ABSPATH . ‘wp-admin/includes/upgrade.php’);
dbDelta($sql);
}
}
Teneke,
Thanks for the tip, I’ve been looking for a way to put the tables in utf mode, but couldn’t find time to do the search. You modification will be available in next release.
I am glad to help, for me this plugin is best multi language option.
You have done nice plugin!
Thanks teneke !
I’m glad you find this plugin usefull :)
hi. Thanks for plugin
perfect.
Regards
Hello,
Super la nouvelle doc ;-)
Entre temps j’ai avancé dans l’utilisation, et j’ai un souci dans l’affichage conditionnel d’une page da
Bon en fait le code en php ne passe pas dans les commentaires. Je vais chercher un autre moyen de transmettre mes infos. Je crois que tous mes commentaires sont peu utiles pour la communauté et pourraient être supprimés ;-)
Hi Anthony!
Nice plugin indeed, I just love it: it is just what I needed for what I am doing now.
I have a question for you: it is possible to insert a code in some templates of my wordpress theme so I can switch the language of some specific texts?
Thank you very much in advance and also for share this useful tool.
Grettings from Chile.
Lai,
You may check for the content of the variable $locale which contains the current language.
Or, you can just translate your theme and use i18n feature of Wordpress.
Anthony, first of all thanks for the credits. :)
Now, I’ve downloaded and installed new 1.1
My blog has been setup to use it_IT as default language.
When plugin is DE-activated I can see the italian version of the admin, blog, simple press forum, etc.
But when I activate it everything goes to english.
I setup the zdm as follows:
4 languages, italian default with permalink to /
in options italian is the default language too, generate permalink for default is setup on yes, because I noticed that the link notiziedallinferno.com/forum simply refresing the home page.
BTW: I also made the it_IT.mo for the plugin, if you like I can send it to you.
Ferlo, apparently there is a bug with locale in dashboard, I’ll look into it ;)
I can translate this plugin to spanish if you want. Sende me an e-mail.
Anthony, the problem was not related only to dashboard, but also to other plugins.
I mean, the simple press forum, chnged its own language after installing ZDM.
maybe you already realised it, and I understood wrong your reply. forgive me :)
Ferlo, this is strange, did you set default language as italian ?
Anthony,
I think there is something wrong in my installation, because I have the language in the right dir, I’ve got the wp-config.php corrctly setup but I continue seeing the whole site in english. suggestions are welcome :)
Anthony, the problem has been solved.
The trouble with language was in place because when I setup ZDM I wrote it, instead of it_IT.
I think all flags should be renamed accordingly to the language.
Default language italian.
With permalink “/” and “generate permalink for default language”=yes
this is the result:
Italian: mysite.tld///estero/il-caso-telecinco/
English: mysite.tld/en/estero/il-caso-telecinco/
French: mysite.tld/fr/estero/il-caso-telecinco/
Spanish: mysite.tld/es/estero/il-caso-telecinco/
With italian pemalink empty and generate permalink for default language = yes
whatever post I choose I simply refresh the home page
no way to switch to other languages using the language links from the widget
With italian pemalink empty and generate permalink for default language = no
same as above
With italian permalink as / and generate permalink for default language=no
Italian: mysite.tld/estero/il-caso-telecinco/
English: mysite.tld/en/estero/il-caso-telecinco/
French: mysite.tld/fr/es/en/estero/il-caso-telecinco/
Spanish: mysite.tld/es/en/estero/il-caso-telecinco/
When using the language switcher on top of same message with permalink / and generate permalink = No
here’s the links:
mysite.tld/en/cronaca/fasci-ignoranti/
mysite.tld/es/en/cronaca/fasci-ignoranti/
mysite.tld/fr/es/en/cronaca/fasci-ignoranti/
mysite.tld/es/en/cronaca/fasci-ignoranti/ <- this one is the link under the italian flag
What am I doing wrong?
Please discard the previous post, I goofed the URLs. this is correct now.
Sorry for the mistake.
Ferlo,
in fact if you want no permalink for italian, what you have to do is set permalink to “it” for italian, and set generate permalink = No
It will cause big problems if you include a / inside the permalink and if set to an empty permalink (due to rewrite_rules change)
Generate permalink set to no means that the permalink will not be used to create links (therefore the value included will not be set in links, but can be interpretted by wordpress => you have to set a correct value)
ok, let’s face this:
my whole site is in italian and I want to keep the current permalink. I mean that for italian I do not what to make any change.
so mysite.tld/whatever for italian
Then I want to add english, french and spanish as
mysite.tld/en/whatever
how can I achieve this?
If I change the permalink structure now I’ll loose all my positions on SE.
maybe I got the point.
I setup for the default language (italian) the permalink as ‘IT’, then, in options I selected: ‘no’ for “generate permalink for default language”. seems I’ve done what needed. I’ll let you know if I’ll get in trouble again.
Ferlo, you did it correctly, but one thing you have to know is that even if you have generate permalink for default language=yes, your old permalinks will keep working, just try this : http://www.zen-dreams.com/zdmultilang
you’ll see this page ;)
Hello,
J’ai fait de nouveaux tests avec l’affichage conditionnel dans la sidebar. J’utilise query_posts(’page_id=mon_id’) avant une boucle pour afficher le contenu d’une page précise dans ma sidebar. Curieusement le plugin zdmultilang n’opére pas et la traduction depuis la langue par défaut (fr) à la seconde (en) ne se fait pas. Le même code mit dans l’index.php opère correctement. Une idée ?
Fred,
Pour cet affichage, il doit utiliser une action qui n’est pas interceptée, il faudrait que je regarde pour faire ce genre de tests.
Si tu as le temps ça m’intéresse beaucoup, car pour le moment je n’ai pas encore trouvé de solutions alternatives.
Hi Anthony,
I’m ferlo’s wife, with my cooking blog :)
I used the validator XHTML on my site and discovered some little errors in the code of your page zd_multilang.php
some alt=”‘.$LanguageID.’” tags and final slashes / are missing
I fixed it in my file but, please, can you fix it in the official version? So, when you will give us a new release, all will be ok.
Thanks and good work!
Hi luisa,
I’ll have a look at it and fix everything that needs to be fixed for next release, thanks for the information :)
Mr. Anthony:
I’m trying to use the zdmultilang and I get the following error:
Warning: Invalid argument supplied for foreach() in /home/domains/juliomaestro.com/web/blog/wp-content/plugins/zdmultilang/zd_multilang.php on line 189
Warning: Invalid argument supplied for foreach() in /home/domains/juliomaestro.com/web/blog/wp-content/plugins/zdmultilang/zd_multilang.php on line 189
From here, it is not PUDE add languages or use a default language … solution that can have?
Thank you
Julio, it seems that there might be a problem due to the fact you didn’t translate any term.
Mr. Anthony:
I’m sorry.
I’m trying to use the zdmultilang and I get the following error:
From here, is that I can not add language or use a default language … solution that can have?
Thank you
It’s a complete error:
Warning: Invalid argument supplied for foreach() in /home/domains/juliomaestro.com/web/blog/wp-content/plugins/zdmultilang/zd_multilang.php on line 189
Warning: Invalid argument supplied for foreach() in /home/domains/juliomaestro.com/web/blog/wp-content/plugins/zdmultilang/zd_multilang.php on line 189
Fatal error: Cannot redeclare zd_multilang_tinymce() (previously declared in /home/domains/juliomaestro.com/web/blog/wp-content/plugins/zdmultilang/zd_multilang.php:74) in /home/domains/juliomaestro.com/web/blog/wp-content/plugins/zdmultilang/zd_multilang.php on line 73
Salut,
je voudrais savoir comment faire pour attribuer les fichiers thèmes à la langue sélectionnée? Car là, tous les textes sont affichés en français quelque soit la langue.
De plus, les tags (étiquettes) sont TOUJOURS affichés en français :( Comment cela se fait-il?
Je sous sous WP 2.6.1 et ZD 1.1.0
Merci pour ton plugin.
Frib, tu n’as rien de spécial a faire pour que le thème soit traduit. Il doit l’être via l’utilisation des fichiers de langue de WP. Le thème Sandbox, qui est une base de thème permet la localisation.
Toutefois, les langues définies doivent êtres reconnues par Wordpress, et donc correspondre au tableau dont je parles dans la F.A.Q.
Concernant les tags, si tu avais un lien vers ton blog, je pourrais aller voir car je n’ai jamais entendu parler d’un tel bug.
Bien sûr:
[Lien supprimé]
Merci pour tout.
Frib, je vais voir ça dès demain :)
Frib, effectivement il semble bien y avoir un bug, mais je ne vois pas ou, peut-etre est-ce du à un mauvais Language Code (de au lieu de de_DE) mais je ne suis pas certains.
Au niveau de ton thème il n’y a rien d’anormal, et ailleurs la traduction de tags fonctionne correctement.
Maintenant, je ne vois pas pourquoi ca ne fonctionnerais pas :s
Bonsoir,
j’avais testé avec de_DE mais il n’y avait pas le flag et les tags ne marchaient pas non plus :(
Bonjour et bravo pour le plugin.
Cependant, j’ai un souci. J’ai essayé de suivre à la lettre ce qu’il faut faire, l’installation se passe sans souci. Le problème après, c’est quand j’essaie, via le widget, de passer d’une langue à une autre (le français en langue par défaut et le malgache comme 2° langue), les articles ne changent pas. Ca reste en français! Et pourtant, quand je clique sur le petit drapeau dans l’article, la langue change. Je ne sais pas si c’est mon thème ou la version de wordpress que j’utilise, mais ça ne marche pas. En tout cas,merci pour le plugin car apparement, ça marche pour les autres!
Kael,
Utilises-tu les permaliens ? Car il y à en effet un bug avec le widget et les blogs n’utilisant pas les permaliens.
Il faut que je regardes ca en détail, mais je ne peux pas promettre de temps de résolution en ce moment (je suis en train de réécrire mon plugin de stats) :s
Par contre, tu peux utiliser une fonction zd_multilang_menu pour intégrer ca dans ton thème, théoriquement cela fonctionne.
Hello,
I just get an screen where I get the message there is no language installed and I should install one. How?
Christian, just follow the documentation, it’s described in step 2.
Très beau travail !!!
Toutefois, j’utilise WP 6.1 + theme Fresh2 2.07 ainsi que le plugins FCK Editor 2.41 et je rencontre des pb lorsque j’edite une page ou un billet. L’editeur FCK ne s’affiche pas et je ne peux donc copier le code html de mon billet original …. Une idée ? Cordialement
jpat, lorsque l’on edite une traduction, l’article original s’affiche mais directement interprété et donc sans éditeur de texte. Si tu veux récuperer le code HTML, il faut le faire directement dans la page de l’editeur classique.
5 Rétrolien
[...] ZDMultilang : Celui ci vous permet de configurer autant de langues que vous le souhaiter et de traduire vos articles, catégories et tags dans ces langues. [...]
[...] documentation is available here in english and here in [...]
[...] ZDMultilang - in mehreren Sprachen bloggen. [...]
[...] Instalação [...]
[...] Instalação [...]