Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question