I use the author's alien plugin link to the plug-in files , which displays on top of the topic texts, its own text and comments functionality.
I create a translation in the usual way through the Loco Translate plugin for the WordPress site. Fortunately, it is similar to the Poedit program and works just as well.
As usual, 2 MO and PO files were created based on the pot file.
translation is ready.
Loco Translate shows all green check marks. The names of the files with the original match. everything is good.
The problem is that the texts on the site remained in English.
Rechecked through other browsers, cleared the cache and updated the page.
It did not seem. No text translations.
What could have overlooked that the translation remained hidden? and the fact that there is no load_theme_textdomain in the plugin. implying that the topic should pull it up. however, the problem remained unresolved.

Closed due to the fact that the essence of the issue is not clear to the participants of KAGG Design , nörbörnën , 0xdb , MihailPw , kot-da-vinci 30 May '18 at 12:54 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Comments are not intended for extended discussion; conversation moved to chat . - YurySPb
  • @YurySPb thanks. But strangely, the system did not offer to move our noodles from kamentov to chat. And then I myself, of course, hid. - KAGG Design
  • @KAGGDesign, but the system called the moderator) - YuriySPb
  • @Yuriy SPb something is wrong in the conservatory) - KAGG Design

1 answer 1

Add your theme to the functions.php

add_action( 'plugins_loaded', 'o2_load_textdomain' ); function o2_load_textdomain() { load_plugin_textdomain( 'o2', false, 'o2/languages/' ); } 
  • displayed. thank. but after the MO and PO files are uploaded not on a par with the plugin folder / languages ​​where the o2.pot file is. and here is wp-content / languages ​​/ plugins. It was only 2 files that downloaded the most unnecessary subfolders o2-ru_RU.po and o2-ru_RU.mo //// strange how this action looks. - user298304
  • Folder plugin as you called? - KAGG Design
  • The plugin folder is called o2 - user298304
  • Strange. It should work from the languages ​​folder. The kernel searches in two places: in the specified folder (... o2 / languages) and in the / wp-content / languages ​​/ plugins folder - KAGG Design
  • I understood why it does not work from the subfolder of the plugin. The third argument in load_plugin_textdomain () is the path relative to WP_PLUGIN_DIR. Corrected the answer. - KAGG Design