Setting Up Multilingual Site in DataLife Engine (DLE)

I’ve been working on a website using DataLife Engine (DLE), and I have the need to create two versions of the site in different languages: English and Russian.

There are several ways to implement this feature, and so far, I know only two methods. The first, and simplest, is to set the default version of the site on the main domain, while adding the second language on a subdomain. It involves setting up unified registration and keeping both versions of the site visible, indexable, and searchable on search engines. However, the downside is that we end up with two quite heavy sites due to the engine.

The second method is more interesting in its implementation and is very lightweight compared to the first. However, it should be noted right away that the alternative version of the site with a different language will not be noticed by search engines, and in general, it only creates the appearance of multilingualism. But I’m confident that this method will suit many projects.

In general, it all boils down to creating two (or more) site templates with different languages and implementing buttons for language switching. For example, we create two templates, one in Russian and the other in English. We place the folders in the templates directory:

/templates/rus/ /templates/eng/

Next, we download the English language version for engine messages. For some reason, in the null versions of DLE, only Russian is present. We download it and place it in the “language” folder.

In the admin panel settings, we set the default template; let’s make it Russian. Also, we set the default language to Russian.

Next, to make the second template completely in English, we go to the “Other Sections” in the admin panel, where we find “Site Templates” – find our “eng” and attach the “english” language to it. Now, all system messages from DLE will be in English (or any other language, like Japanese).

The next step is to add language switch buttons. Usually, flags of countries are used. So, we create two flags, place them in the template, and turn them into buttons that lead to the following addresses:

/index.php?action_skin_change=yes&skin_name=rus /index.php?action_skin_change=yes&skin_name=eng

Well, now the templates are switching, and the design with system messages is available in two languages. But how do we make bilingual versions of posts so that the Russian template has Russian posts, and the English one has English posts accordingly?

We go to the admin panel, look in the same “Other Sections” for “Additional News Fields,” and add a new field with the following parameters:

Field Name: eng_short Field Description: English description Category: All Field Type: Multiple lines

Then, in the English template, we open the file shortstory.tpl and change the {short-story} tag in it to the additional field tag [xfvalue_eng_short].

Now, in the English template version, the short descriptions that were written in the “English description” field when creating the post will be displayed. Similarly, you can do the same for fullstory and title.

It’s all very simple, and the implementation is quite interesting. But darn it, the English language won’t exist for SEO…