Yoast: Building Page.ly Part4: Scalable and Fast Managed WordPress Hosting | Page.ly Blog http://t.co/ba32Hemn
![]()
Multilingual and Multi Domain Sites in WordPress
One of the things we're doing more and more of recently is building multilingual, multi domain corporate sites in WordPress. Doing that used to be a fair amount of work, but we've been able to make it a lot simpler lately.
We start the process with a simple WordPress MU install, to which we then add the Multi Site Manager plugin, to be able to run multiple domains off of it. Now this is all pretty simple and straight forward. Now we used to have to build a theme in several languages, but we've recently developed some new stuff that makes that simpler.
Localized templates
One of the things I've done for the StudioPress themes is localize them, which is actually not even that much work if you read the how to for it that John Godley wrote. On top of doing that, we add some other code that I've written, which allows you to pick the language for a blog in the themes backend.

Now this means, that we can run a multi domain, multilingual site in 1 WordPress install, while maintaining only 1 theme.
Localizing dates
One of the other things you need to take care of when you're localizing your WordPress theme is localizing the date output. To be honest the way I'm doing that right now is a bit of a hack, but it allows for us to translate dates from within a theme, without having to use the backend in the other language. It works by adding stuff like this to the themes functions.php:
$wp_locale->weekday[0] = __('Sunday','orangevalley');So now, we can have an english backend, and a frontend in as many different languages on as many different domains as we want, served from one WordPress MU install, with only one theme to maintain. How cool is that?





by graywolf on 17 July, 2009 at 15:34
When you use MU do all of the sites have to be on "one box"? is there a way to string it across several hosting plans? What if you sell a website how difficult is it to extricate a site out of MU?
by Joost de Valk on 17 July, 2009 at 15:40
Yeah, it has to be one box.
No, we don't want that too in those cases :) We could make it work with several different IP's though...
Easy, you can just do a WordPress export like on any other blog per site.
by Roy on 17 July, 2009 at 15:51
How about proxy-ing those sites with a internal scraping function, which only is used as an pass through window. That would solve your "problem".
by Joost de Valk on 17 July, 2009 at 16:51
Yeah, that'd work nicely :)
by derFrankie on 17 July, 2009 at 21:12
Just a quick question - do the different sites have to be on different domains or could they run on separate folders - e.g xyc.com/de xyc.com/it ?
by Joost de Valk on 17 July, 2009 at 21:13
Separate folders work too, though I use another (custom built) plugin for that.
by derFrankie on 17 July, 2009 at 21:18
Thx - I see - I'm looking for a decent multilingual solution for wordpress blogs for years now - and can't find any.
Do you plan to make your custom build plugins for this purpose available (even as paid solution)?
by Joost de Valk on 17 July, 2009 at 21:19
Not for anyone not hiring us, but ehm, you could of course hire us ;)
by derFrankie on 17 July, 2009 at 21:42
Will take it into consideration for my next commercial project in this direction :)
by Daniel Koskinen on 21 July, 2009 at 04:29
@derFrankie - have you looked into WPML? Has worked decently for me. http://wpml.org
You can separate languages by subfolder (company.com/en), subdomain (en.company.com) or parameter (company.com/?lang=en)
by Piet on 28 July, 2009 at 21:29
You could try WPML (http://www.wpml.org) they have a fantastic free plugin for multi-lingual sites!
by Andrew on 19 July, 2009 at 16:29
Can I ask the name of the custom plugin you've built? I am looking to host multiple blogs under the same domain using a homepage that shows posts from the various subfolders. Is there a plugin that will allow me to do this?
by codestyling on 17 July, 2009 at 21:24
I think, it would be much easier to skip the "hacked" theme in terms of dates but allow loading the correct WPMU main language files in relation to the international presented page.
This can be achived by a simple frontend locale filter.
To get the backend in the right language and also make it comfortable for native writing authors (because they can choose the prefered language) i would suggest my plugin WP Native Dashboard that works with WP, WPMU and BuddyPress.
This would be in total the maximum flexibility you can provide for any i18n site.
by Joost de Valk on 17 July, 2009 at 21:58
We need to actually maintain those sites, that's a lot harder if the backend is in Spanish :P
by codestyling on 17 July, 2009 at 22:03
Sure, but you can choose your language for maintenance as you need it on demand. It's user dependend and possible choosen by login screen, personal profiles or quick switcher.
Where is there problem with that ?
by Joost de Valk on 18 July, 2009 at 09:41
Hmm ok cool, let me dive into your plugin :) Thanks for commenting here!
by Agus on 19 July, 2009 at 04:44
Can you share how to add theme option to choose language from theme backend?
Thanks
by Joost de Valk on 20 July, 2009 at 13:04
Nope sorry.
by Agus on 25 July, 2009 at 20:43
No problem. I've found free WPMU plugin for that.
Thanks...
by Blends on 19 July, 2009 at 17:15
What about the database? It separate or not?
by Joost de Valk on 20 July, 2009 at 13:05
It's WP MU, so each site has it's own tables within one bigger database, and they only share a couple of tables like the users one.
by Jen on 20 July, 2009 at 11:08
A good multi-lingual plugin is the Qtranslate http://www.qianqin.de/qtranslate/ .
Tricky to install though, you need to know what you are doing on this install.
by Bas van den Beld on 20 July, 2009 at 11:09
You must have known I was looking for this and then made it, knew I could count on you ;)
Nice on again Joost
by Joost de Valk on 20 July, 2009 at 13:06
hehe you and a zillion other people ;)
by Shawn on 20 July, 2009 at 15:32
Hey Joost, when you use WordPress MU this way on different domains can different themes and different plugins be used on specific domains? Would you choose this strategy over 6-7 separate WP installs if developing a blog network with different admins?
by Joost de Valk on 22 July, 2009 at 12:28
Hey Shawn, yes and yes :)
by Mal on 21 July, 2009 at 16:09
Hi Joost, any favorite examples of a live multi language WPMU install that you could mention? I'm also looking into an MU solution for an entity that has offices in many countries and they want to use subdomains for remote offices. Thanks - Cheers -
by Karim on 24 July, 2009 at 03:48
Hello - I am attempting to migrate 6 blogs with individual domains (that have been 'networked and are on the Blogger platform) to WP. Would this multi-domain plugin on the WPMU platform be what I am looking for? Or do I have to install separate copies of WP for each blog/domain? Thank you
by Joost de Valk on 24 July, 2009 at 06:10
Yes this multi domain stuff is probably what you're looking for :)
by Emerging Host on 24 July, 2009 at 15:17
Really Cool , It will save lot of time and remove headache to manage sites
by breakcpa Larry on 24 July, 2009 at 20:22
Thanks for posting about this, I would love to read more about this topic.
by kumpulin on 24 July, 2009 at 22:20
wordpress MU ?
oh no,, I dont know it..
but, sure.. I must learn more about it..
thanks
by Viralwordpress on 25 July, 2009 at 04:01
Multilingual Multi domains on WordPress. Now I like that idea.
by Florin on 25 July, 2009 at 21:42
I used the Language Switcher (langswitch) plugin for WP and it's working quite well. See it working here: http://vocatia-te-angajeaza.ro
You can select the language, it uses the wp included GNU Gettext so you can have a lot of languages if you want, all you need is to:
1. make the .mo files for each language (in my case ro.mo only)
2. each article is to be written in the posts/pages area in wp-admin for all the languages, between the custom tag [lang_en][/lang_en], [lang_ro][/lang_ro], etc.
Florin
by Samuel Lavoie on 26 July, 2009 at 05:22
With the futur merging of WP MU into the core WP development, will this multi domain plugin will still work ? any ideas if this can work with a WP instalation ?
thanks for putting that enhancement to that plugin Yoast.
by Jehzeel Laurente on 26 July, 2009 at 11:56
Wow! Pretty cool indeed! I think I could apply this nifty trick with my other websites :D
@Samuel Lavoie - that's also my question in mind.. Hmmmmmmm...
by James on 28 July, 2009 at 12:35
I host a single blog in both English and French. I only have the xlanguage plugin by Sam Wong and have modified one theme. I also have the French wordpress language files on the server.
Backend is only in English, which suits me fine
It works a treat for me even if I have to write the articles in both English and French
by Michael Jon Wissekerke on 30 July, 2009 at 09:15
no to convince my bosses to migrate from asp to php
*evil laugh*
thanks for the info Joost!
by Joost de Valk on 6 August, 2009 at 11:38
That is quite the change :)
by Neri on 3 August, 2009 at 18:12
Creo que es buena la teoria en un principio, pero definitivamente solo la implementaria solo para empresas grandes, para empresas chicas se pueden encontrar plug-ins mas sencillos en su manejo.
by beth on 7 August, 2009 at 14:17
hey great concept and really cool!
from seo prespective, will each site be able to garner its own PR? and be different for seo purposes; for example, each site would have same category and post with a different take? And if so, will database be easy for admin to understand and make different posts on same subject at same time to multiple domains but be different for seo and user experience?
by seospidy on 8 August, 2009 at 10:46
this is one of the best concept i have ever seen and a awesone job done by u..
thanks
by Cyril on 9 August, 2009 at 06:53
my solution to multilingual blog was to make videos in several languages! Do you know which are the best multilingual blogs out there?
by Ateljé Digital on 13 August, 2009 at 11:04
Great!
I've been searching around the good sites for MU-support and haven't found any good and well tested way yet. You are working with one of the most wanted functions for WordPress at date. Good!
Still trying to figure out how the MU-functions will influence my SEO work though.
Thanx for the good post. I found the WPML as some other above. Think your trick is more reliable. But... as WPML is for free, and I wont be able to hire you. I will give that a try.
Keep up your good work! Using your breadcrums with great success!!!
best regards
/jocke
by usman on 19 August, 2009 at 05:00
i like this and i will try this plugin.
by mochilero on 4 September, 2009 at 09:23
What if what you need is to use two different API keys from google in order to be able to run maps in any of them?
by snoman on 16 September, 2009 at 09:47
Can we use MU to host our blog on our upcoming PC site http://www.sno.travel and then use one of the mobile plug-ins to put a phone-friendly version on our mobile site http://www.sno.mobi ?
We wanted to put the blog on our mobile site, as that's what we launched and are promoting first, but find that there's all sorts of conflicts with WP and our clever, device-detecting mobile system (eg we have created the world's first mobile site with dynamic URL re-writing in all 6 major mobile browser languages) ... so it would be more ideal to put WP on the PC site domain.
SO THE BIG QUESTION IS... will WP allow us to put, not simply another blog on a different domain, but the mobile version of the SAME blog onto the other domain?
by snoman on 16 September, 2009 at 20:15
an alternative is to use a different domain for the blog as we own http://www.snoman.mobi and http://www.snoman.me but I don't think we would get nearly as much SEO benefit for the main ski holiday sites (and that's really the point of having the blog)
we've been looking at adding all the plug-ins and settings listed on your excellent must-have page but will they all work with MU?
and can we still implement a really simple mobile theme for one instance of the blog (ie on sno.mobi or snoman.mobi) ?
we're at the start of an incredible 4 month tour of the French and Swiss ski resorts and realise that we're missing a potentially unrepeatable load of top drawer blog material... so we really need to get this right quickly...
... what say you?
by snoman on 16 September, 2009 at 20:19
by the way - we just tested your excellent plug-ins with the dotMobi plug-in (its designed to put your site on a regular and a dotMobi domain, which is what we have) and there ae errors/conflicts so, really annoyingly, we can't combine the best mobile WP plug-in with the best SEO plug-ins
:-(
sinking into an un-optimised fug
by decha kunla on 5 November, 2009 at 01:26
Really nice article, i read entries blog afternoon then add it to my bookmarks and wait for your next article, i plan follow as you.
Thanks so much
decha kunla
Pingback: Mehrsprachiger Blog - Ja oder Nein? | Das Allround Blog