M
M
MarkBogrov2016-11-06 16:47:42
Internationalization and localization
MarkBogrov, 2016-11-06 16:47:42

How to translate strings across a theme in Wordpress?

Hi friends, I'm an avid drupaler, but I'm completely new to Wordpress, so please don't throw too many tomatoes for a possible lack of understanding of the architecture.
The question is: can I translate various strings, for example, from plugins, through .po .mo files abandoned in my theme folder? Now multilingual support is provided by the Polylang plugin. There are a couple of buttons that I would like to cover in three languages ​​with little bloodshed without generating .po .mo for each plugin, which will translate at most one inscription per plugin.
If there are more correct ways to translate individual lines, I will be glad to kick you in the right direction.
PS
I'm interested in a multilingual structure, that is, the project simultaneously supports several languages.
Thanks for any helpful information!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2016-11-08
@MarkBogrov

Translation files come separately for the engine, themes and plugins (each plugin). Look for them in the plugin folders and in wp-content/languages. For each plugin, see the doc or the code itself, it will become clear where it will look for its translation file.
In general, if the format of working with poedit is familiar and understandable to you, then this is best. There are solutions in the form of plug-ins, such as Loco Translate. But, as far as I know, they do not parse all lines from the code, there are some nuances there. You can google Otto + gettext + loco translate, it was once discussed somewhere on the web.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question