T
T
TANK_IST2017-03-23 10:28:51
Internationalization and localization
TANK_IST, 2017-03-23 10:28:51

How to translate wordpress theme to another language?

Hello.
In the theme files, I wrapped the necessary phrases with the __() function
Installed Loco Translate and translated the phrases.
I set the desired language on the site, but the translation does not work.
Why?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
TANK_IST, 2017-03-25
@TANK_IST

Should have just used the second parameter

A
Alexey Sklyarov, 2017-03-23
@0example

Why - I will not say, but I will tell you how I translate the topics.
In the theme files, I make all the text entries through the function __e(), after which I launch the Poedit program, select the item in it: translate the Wordpress theme, and, in fact, I translate the theme. Save all files in the /lang/ folder of your theme. Then you can upload it to the site itself.

V
Vasya Petrov, 2017-03-23
@VasyaPertrov

Why?

Maybe a text domain issue https://developer.wordpress.org/reference/functions/__/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question