M
M
matros972019-02-05 16:29:00
Iron
matros97, 2019-02-05 16:29:00

WP Multilang how to enable custom data type support?

Hello, I created my own data type using the register_post_type() function,
but for some reason there is no translation of fields for multilingualism in the WP Multilang plugin.
WP Multilang how to enable custom data type support?
This is how I created my type:

add_action('init','we_index');
function we_index() {
  register_post_type('we',array(
    
    'public'=>true,
    'supports' => array('title','editor', 'thumbnail'),
    'menu_position' => 20,
    'menu_icon' => 'dashicons-clipboard',
    'labels' => array(
      'name' => 'Почему мы ?',
      'all_items' => 'Все',
      'add_new' => 'Добавить пункт',
      'add_new_item' => 'Новый пункт'
    )
  ));
}

Created wpm-config.json file
{
"post_types": {
"we": {},
},

But there is no translation
mgx19s
In the editor itself there is no possibility to switch languages
mgx94y
​​Tell me who has come across this

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
Georgy Pelageykin, 2016-07-10
@ArXen42

Recently there was such a problem. On the flash drive, the partition table has changed to iso-something-there. The solution is to go into cfdisk, for example, and return gpt/mbr.
Which is typical, by the way, linux eats such a flash drive without problems, but Windows breaks.

E
efkot, 2016-07-11
@efkot

Smoke www.usbdev.ru according to the manufacturer of the controller software, reset the flash drive settings and format

E
Ezhyg, 2016-12-01
@Ezhyg

Command line as administrator:

diskpart
list disk

determine the desired disk (the one that is a flash drive)
select disk номер_диска
clean
exit

Remove the flash drive and reconnect. Further actions can be done in the usual way (although it would be possible directly from diskpart)

M
Marina Osmak, 2020-02-07
@osmakmv

It helped me to solve this problem by taking the json content in the plugin itself (core-config.json) and inserting it into the wpm-config.json file, and then adding my own custom entries to enable translation for them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question