WordPress Multilingual Mulitisite

Say that title three times fast.

I think it is only fitting that I also make this a multi-part blog post as well. keep reading if you want to do a multisite installation of WordPress where each site uses the same custom theme but has a different language.

First off, I’m not going to be going through how to install WordPress. You need to Google that S#@!. Also these post are for people who have done WordPress installs and written custom themes. This is intended only as a quick overview for those folks.

Note, the wordpress docs use the term Network interchangeably with multisite. And the official doc is here. The gist of it is to add :

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );

To your functions.php file.

Then click Tools > Network Setup from the admin screen and follow the directions. Now Neo it is going to ask you to choose the red pill or the blue pill. Wait, wrong story. It is going to ask you to choose to use sub-domains or sub-directories. I’m going to write about using sub-directories.

My setup is for three sites in my network. The main site will be in English and the other two will be Spanish and French.

So the root page will be => my-web-site.com/

The Spanish site will be => my-web-site.com/es/

The French site will be => my-web-site.com/fr/

Now that you’ve got that settled, WordPress will give you some code to add to you wp-config.php file and your .htaccess file. Be sure to read the little note below the snippet for wp-config on where to paste it.

Once you’ve set up you sub-domains the old WordPress world you were so use to, the admin page that you knew like the back of you hand, will disappear. Your admin page will have a new level of abstraction. You my friend are now a NETWORK ADMIN. You can even put that on your business cards. And if you don’t know what a business card is you can use it as an email signature. And if you don’t know what that is you can add it to your Twitter profile. And if you don’t care…

Now the next step is to add a plugin. To add plugins in multisite you need to make sure you are on the network admin page then click plugins > Add new. The plugin we need will make it pretty easy to switch between languages on your new multisite network. And like all WordPress plugins the name is really weird. Multisite Language Switcher. Who’d have guessed it.

After installation you’ll need to go to each of your sites and set the language for both the admin area and the blog area. I set all my admins to English and the blog areas to their respective idioma language. Man, sometimes las palabras the words get a jumbled in my head.

Ok, I’m going to tell you about a really strange bug I ran into. And give you the magic spell to fix it implement a work around. Here is what I ran into. The permalinks for the two alternate languages worked perfectly fine. I like to use the post name as the permalink. But the links for my main site all had /blog/ in the url. After hunting a googling for a while I came across the answer.

Step One: set the permalink in you main site the use post name.

Step Two: Go to nework admin, then sites, hover over the site name and click edit.

Step Trés: click the settings tab. (Told you admin was a new world now). Then scroll down to permalink stucture and get rid of the /blog.

Step Four: (This is the magic spell I was talking about) Go back  to the main site’s settings > permalinks let the page load then leave the page and never go back. Don’t save or you’ll have to do it all over again. My theory is we just have to threaten the page then walk away.

Ok, that should get you started. Next time we’ll walk through how to create language files and the code to use them.


Published by

Brian Gaeddert

A hard working quick learner who is an ambitious and self-motivated web developer with a strong technical and design background who possesses self-discipline and the ability to work with the minimum of supervision. A great team player who thrives on creating innovative solutions in a multidisciplinary team, is detail-oriented and has the ability to produce detailed technical specifications from client requirements. A quick learner who can absorb new ideas and communicate quickly and effectively. A high awareness of industry issues and trends, particularly in regard to emerging technologies, website usability/accessibility, mobile solutions, and data integration. Native English speaker with professional proficiency in Spanish.

Leave a Reply

Your email address will not be published. Required fields are marked *