Translate Dokan plugin using Loco Translate

Having a translated site is an essential requirement of a site owner whose target audiences are not native English speakers. The case is the same when someone wants a build a multivendor marketplace.

The translation process varies platform-wise, but if you are building a multivendor marketplace on the WordPress platform using the Dokan plugin, then this article might help you.

In this article, I will focus on how to translate the Dokan plugin using Loco Translate, but you can follow the same process to translate other plugins/themes of your site. You just need to know the proper text-domain of the themes/plugins that you want to translate. In that case, you can reach out to the respective plugin support for further information.

Please note that you will not need to translate WordPress and WooCommerce in most cases. Because they translate automatically by changing the Site Language from the WordPress Admin Dashboard > General setting screen.

Anyways, let’s dive into the article and learn how the Dokan plugin can be translated.

Installation of the Loco Translate

The plugin can be installed directly from the site’s WordPress Admin Dashboard > Plugins > Add New menu screen.

First Step of Translating the Dokan plugin

After installing and activating the Loco Translate plugin, navigate to the WordPress Admin Dashboard > Loco Translate > Plugins menu screen.

Choose the plugin that you want to translate from that screen. In our case, we will choose the Dokan and Dokan Pro plugins.

A question might come to mind do we need to translate both Dokan and Dokan Pro plugins?
Though the Dokan Pro plugin depends on the Dokan Lite (Free) plugin, they are separate plugins that need to be translated separately.

Adjusting text-domain for the Dokan Pro plugin

( Only Dokan Lite (Free) users can skip that part )

The Loco Translate plugin usually picks the text-domain based on the plugins/themes – folder/directory name, but the text-domain name might not be the same as the folder/directory name, and it happens with the Dokan Pro plugin. The Dokan Pro plugin’s directory name is dokan-pro, but its text-domain is dokan.

That is why it requires some adjustment before translation.

So, before translating the Dokan Pro plugin, navigate to the WordPress Admin Dashboard > Loco Translate > Plugins > Dokan Pro > Advanced tab.

From that tab, replace the pre-inserted dokan-pro text with dokan from the Text Domain, File Prefix, and Template File input fields.

Then hit the Save Config button.

Translation template file creation

Click on the New language option from the Overview tab screen that comes after clicking on the Dokan/Dokan Pro from the WordPress Admin Dashboard > Loco Translate > Plugins menu.

From the next screen, choose the desired language you wish to translate and the location where you want to keep the translation file. You can select the recommended file location as shown in the below screenshots.

For this article, I am choosing Spanish (Spain).

After selection, click on the Start translating button to start the translation.

Insert translated text in the preferred language input field and save the file

The next screen is the translation screen, where users can translate each English-written text into their language.

After inputting translated texts, hit the Save button to save the file.

See the changes

Now, it is time to see the changes. To do that, change the Site Language to the preferred language from the WordPress Admin Dashboard > Settings > General screen and hit the Save Changes button.

Bonus Part (Automatic Translation):

By installing the plugin, a new button will be added to the Editor screen of the language template named Auto Translate.

Clicking on the Auto Translate button will open a popup window where three translation providers ( Yandex {free}, Google & DeepL ) will be available for automatic translation. After selecting the desired translation provider, hit the [Service Provider] Translate button.

Here, I have selected the Yandex option and clicked on the Yandex Translate button.

The next step will be the automatic translation process window that comes after clicking the button, as mentioned earlier.

At this stage, click on the Translate to button to start the automatic translation.

After completion of the automatic translation, click on the Merge Translation button.

Then click on the Start Adding Process button from the next window to add all automatically translated texts to the language template.

After that, click on the Save button to save the translation.

Great!! The automatic translation process has been done successfully.

Important Note: The automatic translation may create an issue with dymanic (like %1$s) values. So, it would be better to check the transation after competion to avoid any error.

Thank you for reading this article. If you find it beneficial, support me by buying me a coffee.

1 1 vote
Article Rating
Notify of

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments

thanks for your help. thats really made me crazy but I couldnt. With your help now I’m so happy. Now I can go for a coffee time :))

Would love your thoughts, please comment.x