Set Up a Multilingual Site in OpenCart

In the domain of website development, multilingualism is no longer a buzz word and is instead considered something that should be available as a default feature. Most of the popular sites have already implemented it, so that their services can be reached by more users no matter how geographically dispersed they are and what cultures they belong to. Also, it's considered an added advantage for you if your competitors don't provide it.

In this article, we'll discuss multilingualism in the context of OpenCart. As with the other frameworks, the support of setting up multiple languages in the store comes in the core itself. Of course, you'll need to download and configure the language packs from the marketplace. And yes, that's the topic of today's article, in which we'll go through the complete process of setting up a multilingual store in OpenCart!

Of course, we'll use the latest major version of OpenCart, so make sure that you've installed it!

Download the Language Pack

Of course, it's one of the first things you'll need to do—download the desired language pack from the OpenCart marketplace site.

Go to the OpenCart Marketplace and search for the desired language pack. You could choose either a Free or Commercial license. For the course of this tutorial, we'll use the free Dutch language pack.

Find Language Pack

Of course, you could grab a different one of your choice! Go ahead and click on the Nederlands - Dutch OC 2.x pack, and it'll take you to the download page. Click on the Download link corresponding to your OpenCart version.

Download Language Pack

Now that we've downloaded the language pack, the next section explains how to install it from the back-end of OpenCart!

Install the Language Pack

First of all, extract the zip file you downloaded in the last section, copy it, and overwrite all the contents under the upload directory to the root of OpenCart.

Next, head over to the back-end and navigate to System > Localization  > Languages. Click on the + icon to add a new language. I've configured the settings for the Dutch language as shown in the following screenshot.

Add Language

You may be wondering from where I've got all these settings! Don't worry, it's always included in the readme.txt file which comes with the language pack itself. In our case, you'll see that leesmij.txt is available with the other contents. Although the contents are in Dutch, you could easily guess the field settings included in the file.

Fill in the required fields and save it!

List Languages

Congratulations! You've installed a new language in your store, and it's a multilingual store now!

Test Ride the Front-End

Head over to the front-end and go to the homepage, and to your surprise there's already a language switcher available!

Language Selection

Surf a couple of pages here and there, and you'll see that almost every label is now translated to the corresponding language.

Of course, the content is still displayed in the English language. To fix that, you'll need to edit the categories/products, and you'll find the tab Nederlands along with the English tab. So, you could enter the information in both languages—which makes your store truly multilingual!

How to Set the Default Language of the Store

In this section, we'll see how you could set the default language of your store. Navigate to System > Settings and edit the default store settings.

Set Default Language

Under the Local tab, you can set the default language for both front-end and back-end. So in this way you could change the default language for your store to something other than English.

So, that's the wrap-up! You can download and configure as many languages as you want and make your store a truly global place which could serve diversified communities.

Conclusion

A multilingual site setup is a necessity of today, and that's what exactly we've discussed today in this article.

In the context of OpenCart, we went through the complete process—starting from downloading the language pack to configuring it and setting up the default language of the store.

Needless to say, you could always tweet me or leave comments below for any queries and feedback!

Tags:

Comments

Related Articles