Multilingual website – why and how?

beauty_of_diversity

Multilingual websites are more often choice of companies’ idea for perfect webpage. As living in the times of globalization and extremely ease access to the Internet from almost any place in the world, obtaining multilingual website will probably cross through your mind. Which is actually a very good solution, especially if you are keen on striking markets from abroad.

How to create a multilingual WordPress website?

With a usage of WP plug-ins, of course :) One of the most popular and well-famed is one called WPML – WordPress Multilingual Plug-in. Every user appreciates this extension and scores it very high. It only has one disadvantage – unlike to most of WP plugins – it is not free. However, we may also distinguish few different plug-ins, which are, first of all free and seem to fulfill our needs as well. These are: qTranslat and Language Switcher WordPress Plugin.

Plug-ins are good, but not the best solution for implementation above mentioned cases. We may create a multilingual WordPress in a different way, which is lead by following steps:

#1

Creating few WP installs in one database for specific languages. They differ only in prefixes.

#2

Creating subdomain, for another language. (e.g. ‘de.thenameofyourdomain.com’ for german language). This domain should be held in the same calatogue as the main one.

#3

Changing this line “$table_prefix  = ‘wp_’;in your code to to this:

$subdomain = substr($_SERVER[‘HTTP_HOST’], 0, strpos($_SERVER[‘HTTP_HOST’], ‘.’));
if ($subdomain == ‘de’)
{
$table_prefix = ‘wpde_’;
}
else
{
$table_prefix = ‘wp_’;
}

For any other language you do everything adequately by just changing ‘de’ for ‘pl’, ‘en’, etc.

#4

Now you have to change unlinked flags in your template code adequately for domain address and subdomain address.

#5

The last step to provide ourselves a nice multilingual website is to add the prefix to the additional version website address. You will do it in WP configuration.

 

These are very easy and what is most important up and running ways to change your site into multilingual. Whatever you choose to use – plug-ins or handmade changes, you will not regret implementing this solution into your website. It should quickly improve your recognizability into previously closed markets and customers.