Hello friends! Those who build sites on the wordpress platform know that some themes or plugins are partially localized. In other words, they have not been fully translated into Russian. This is especially true for paid themes purchased from the invato market.
I was once making a website for a Protestant church, and the theme was purchased by a client in a theme forest. He did not have a Russian localization, and if he was left without translation, the site administrators would not be comfortable working with him. At such times, you start to think about how to translate a wordpress theme or plugin yourself and you are looking for the best way to do the translation. The Internet offers many different solutions to this problem, for example, use the poedit program. But I have found the best way in my opinion to translate a wordpress theme into Russian and it is the loco translate plugin.
Translate the wordpress theme with the Loco Translate plugin
The description of this plugin says that the Loco translate plugin allows you to translate the wordpress theme directly in the browser, that is, in comparison with the poedit program, you don’t need to download and upload install anything on your PC. Just install this plugin and translate wordpress themes and plugins with the built-in translation editor right in your site sidebar. The beauty is that you don’t directly touch the .po and .mo translation files, and you might not even know they exist. And with this plugin, you don’t need to know them.
Loco translate how to use the plugin?
So, install and activate the plugin in the usual way. After activation, you will see all plugin settings in the sidebar. Among them, you can choose to translate a wordpress theme or plugin. I’m going to translate the topic, so I go in here and click on “add a language”.


Choose Russian and click on the “Start translation” button. Then, in the “Search phrase” field, insert the text you want to translate. I will insert the text “Learn more & # 8594;”. This is the link text that is after the post is announced and leads to the full post.

Note that the text “learn more” is followed by the unicode character with an arrow pointing to the right & # 8594. When translating, do not forget to include this unicode in the translation field. Like this “Learn more & # 8594;“. The result will be like this.”Learn more → “. Here is the result.

Possible errors when translating a wordpress site
When translating a wordpress site using the local translator plugin, mistakes can be made. One of the most common is to ignore special string prefixes in the translation field. These prefixes are used as arguments of the translation function. They mean a kind of string, text that will be dynamically reassembled in their place, for example a translation function n _ (‘% s article’, ‘% s articles’, 1) will display either “one article” or “ten articles”.
I will give an example of a possible error. When translating the phrase “Continue reading% s”, the name of the current message should be replaced with the prefix% s. If you simply translate the expression as “Continue Reading” and do not insert the special prefix of the translation string % s then there will be an error and the text will disappear completely. It is okay to do it “Continue reading% sIf you made a mistake while translating a wordpress site, all you need to do is find the ‘Restore’ section in the translation editor and click the ‘Restore’ button and everything will come back as is.

Summarize
In this article, I have not described all the possibilities and subtleties of working with the loco translate plugin. But I think I have mentioned the most necessary and the most sufficient for a simple user. Personally, I have enough information on how to translate a wordpress theme or plugin. By following the above method, a translation is performed in any language. After translating, the plugin can be disabled and the translation file in the theme will work fine. If you need to do another translation, activate this plugin again.
If you liked this post, please share it with your friends on social media, pin the content to your feed, and leave a comment. Good luck to everyone!