Translate the theme of \”Dokan\” or any other WordPress plug -in to your own language.

As the title said, here we will discuss the simplest and fastest way to translate dokan here Essence Not only

dokan , this is also applicable to any other WordPress plug -in and theme.

However, if you are already an experienced WordPress user, then you can directly jump to

\”How to translate\” to take further action.

So let’s start watching the Dokan translation process step by step.

How does translation work in wordpress?

WordPress插件翻译-简单的方法

If you are a novice translated by WordPress and do not know, then you may find it difficult to understand, but don’t worry, I understand! You will soon be a professional.

If you set your website language from WordPress for the first time, then you may have noticed that some menu tabs in the left sidebar on the left sidebar of WP-Admin [123

have not been translated.

In addition, if you choose your local language during the installation of WordPress, and then install some plugins You should have noticed that the tab of the newly installed plug -in is still English. Let’s take a look at the following example.

多坎翻译 As you saw in the screenshot on it, I have switched my website language into Spanish marked with green. But do you notice the area where the red label? These string are still English. So what may happen?

If you observe it carefully, you will find that only the default WordPress menu is automatically translated, and all other string related to the 3rd square plugin is not translated. This is because when you switch the site language, WordPress will create a

\”Language\”

folder in

\”wp-content\” folder.

多坎翻译 Now, if you look at the

\”Language\”

folder, you will see the translation file shown below.

WordPress插件翻译 Basically, WordPress will find translation files in the \”

folder. The red label file is automatically generated by WordPress. That’s why we see the default WordPress menu of the translation language without doing anything.

However, the third side plug -in or theme cannot be done. Therefore, you must manually place translation files, or you can start from scratch, but remember, you cannot simply place the translation files anywhere. There are some rules that need to be complied with.

Things to be considered before starting the WordPress plug -in translation

As mentioned above, you need to follow some basic WordPress rules to make it work normally. wordpress 插件翻译指南

01. File name: (text domain)-(localcode)

File name is very important. If there is no correct file name, WordPress will not be able to identify the translation file. Therefore, translation will not be reflected. If you are a novice WordPress, the file name structure mentioned above may be confused. Let’s see some examples:

Assuming you want to translate Dokan Lite plug -in. First of all, you need to know the

Text Domain

and local . So where can I find it? Each plug -in and theme has a

pluginname.php

file in the plug -in folder. Therefore, there should be a file called \”Dokan.php\” in the Dokan Lite plug -in folder.

Let’s go /wp-content/plugins/dokan-like

You can as expected expected See the

dokan.php 翻译 WordPress 插件 file inside. Now, let’s open the file. However, you can use any good text editor to open the file.

After opening the file dokan.php, you can accommodateThe text domain of the plug-in is

Dokan-Lite

. 打开文本域文件

Now you have a text domain. We have one more thing to deal with. Here, you have a text domain to find the regional settings of the national language so that you can translate your website. For this special situation, when you translate into Spanish. So it is best to find a easier language environment code than the text domain. Therefore, you only need to access here and find the correct WordPress language environment .

Let us find

Spanish (Spain)

from the list

WordPress language environment 语言环境翻译.

According to the list,

Spain (Spain)

WordPress language environment

is 如何将 wordpress 翻译成您的语言 ES_ES

. Therefore, you have a text domain and WordPress language environment.

So follow the correct file name of WordPress rules and dokan, the Lite plug-in is: (TextDomain)-(localCode) \u003d Dokan-Lite-ES_ES

Let’s see more examples of other languages.

Spanish (Spain) : Dokan-Lite-ES_ES German: Dokan-Lite-de_de

French (French (French (法国):

dokan-lite-fr_FR

阿拉伯语: dokan-lite-ar

意大利语: dokan-lite- IT_IT

02. File position

Do I still remember the translation file I mentioned in a language folder in the language folder? Well, there are two positions to place files:

For plugins: wp-content/languaGES/Plugins.

For theme:

wp-content/language/themes or

wp-conflic Languages \u200b\u200b

You need middle.

This is a system folder. why is that? Because if you put the file directly in the plug -in/theme folder, your translation file will be deleted. This is why the file is best placed in the system folder so that you will not lose the translation.

How to translate dokan (the best WordPress multi -supplier plug -in)

Now it’s time to see the Dokan translation process here. In order to easily complete the work, please follow the instructions very carefully. 01. Translation Dokan Lite

Turn to

wp-admin \u0026 gt; plugins \u0026 gt; add new

. Search \”

Loco Translator

\”.

Dokan 主动安装

After successful installation and activating the plug -in. You should be able to see a menu called \”

    Loco Translator

  • \” on the left column.
安装机车翻译器 now go to Loco

Translate \u0026 gt; plugins

. You can easily view the plug -in list currently installed on your WordPress website.

  • Important Tips
  • : If you want to translate a theme, you can go to

loco translate \u0026 gt; themes

. 设置 loco 翻译器

] From the list above, you can watchThere are two files to the Dokan plug -in (if you have a DOKAN PRO version). Important Tips : Dokan Lite and Dokan Pro depend on each other, but act as a separate plug -in

In this case, you need to translate these two files Essence First, let’s start using

Dokan Lite .

Now click the \”WordPress插件翻译 New Language

\” option, you will see the following screen.

First, you need to choose a translation language. In our example, we will choose

Spanish (Spain).

Here, you will see the default system location.

If you update or delete the plug -in, select

System location Dokan 翻译由 loco translate will prevent you from losing important files.

In addition, do you notice that Loco Translator can automatically detect the language environment code of TextDomain and WordPress? Therefore, when you use Loco Translator, you don’t need to consider these things too much, unless in some cases.

  • Now click \”
  • to start the translation

button, you will be redirected to the translation management window, you will be able to translate each string of Dokan Lite.

WordPress插件翻译

  • Now let us try to translate a string from Dokan Lite to see if the translation is effective. For example, you can translate the DOKAN menu string in the left sidebar.
  • Search the string \”Dokan\” and translate it into your local language.

now turn to

Set \u0026 gt; conventional loco 的 WordPress 插件翻译 and change the language language to

Spain Word

to see if the translation is really effective.

WordPress插件翻译更新

  • Okay! Our translation works as expected.

02. Translation 翻译 WordPress 插件 Dokan Pro

  • When trying to translate Dokan Pro , you will notice some kind of error, that is, Template missing .
带有 loco translate 的 WordPress 插件翻译

Even if you try to click \”

to skip the template 多坎精简版翻译\” or \”

to create The template

\”to overcome this error, and the final result will be shown below.

  • 如您所见,您只有4 Pass string to translate! There may be some problems. right?
Okay, let us solve this problem.

多看专业翻译

  • First click \”
  • Dokan Pro

\” first Exit the translation editor screen.

创建 dokan pro 模板

多坎亲 Click

Advanced

tab. As you can see,

    template file

  • is lost. The template file is basically a
  • POT

file, which contains all the source string of the plugin or theme. POT files can be found in the

language

folder of the corresponding plug -in folder.

So in the case of Dokan Pro , it should be Language/Dokan.pot

.

  • In addition, the text domain is incorrect. Loco Translation tries to automatically detect plug -in or theme text domains to make our lives easier.
Dokan Pro’s text domain is

Dokan WordPress插件翻译. In addition, the file prefix should be the same as the text domain.

  • After correcting everything, it should be shown below.
  • Now let us go back to start translation.
All source string of Dokan Pro They are all displayed. efficient!

Therefore, if you encounter such problems when using Loco Translator, you know what to do. Dokan pro 翻译与 loco translate

WordPress插件翻译 When you already have a WordPress plug -in translation file

Most most The plug -in has ready -made translation files. Some are completely translated, and some are partial translation. You can use these files so you don’t need to start from scratch.

  • If the file is partially translated, then we can use this file and only translate the remaining string. Dokan also has translation projects.
Dokan Lite’s translation file can be found in

WordPress插件翻译

here

.

Dokan Pro’s translation files can be found

here

. WordPress插件翻译

Let’s translate with existing files

Dokan Lite

Click the link mentioned above.

As we saw, Spanish translation has been completed 96%, we don’t need to start from scratch. We can this translation file and only translate the remaining 4%.

Click

Spanish (Spain)

, we will be redirected to the screen below. We can choose to develop or stabilize. Since both are the same, we can choose to be stable. Click stable.

要下载文件,请Select \”Only matching filters\” as

, and then click Export.

Similarly, select \”Only matching filters\”

to

\”. Mo\”

, and then click the export.

Dokan- WordPress 插件翻译

Now we have two files, the name is as follows:

wp-plugins-dokan-lite-stable-es.po

wp-plugins-dokan-lite-stable-es.mo

[123 ] If you read this article from scratch, then you already know that the file name is incorrect, we need to repair it.西班牙语的正确文件名是:

dokan-lite-es_ES.po

WordPress 插件翻译成西班牙语

dokan-lite-es_ES.mo

[ 123] Let’s rename the file first. It should look like this.

Great! We are almost done. Now we only need to put the file in the right position. We have discussed that the translation file should be placed in the system folder. wp-content/language/plug-in/

WordPress插件的直接翻译

Now we have placed the file to the above position. Let’s go to Loco Translator to see the results.

As you can see, Spanish translation has been completed 97%, we only have 51 string, we can use the Loco Translation editor, we can use the Loco Translation editor Simply translate.

翻译wordpress WordPress plug -in translation: Do you need a local translator

If you already have

\”. PO\”

and

\”. Mo\” file, you can, you can Simply put them in the correct position, and the translation should be immediately reflected when the page refreshes.

For this reason, you don’t need a Loco translator. You only need to ensure that the file name is correct. However, if you want to edit or translate the remaining string, then you will need a Loco translator.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *