MB + Polylang

Support MB Frontend Submission MB + Polylang

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #36711
    Marco CurcioMarco Curcio
    Participant

    good morning,
    I have a problem with translation.
    if in the polylang settings I leave the url: mysite/en/page I can translate all the fields of the MB frontend forms, but I cannot use this solution because I would have to duplicate all the inserted entries of the cpt and it is impossible.
    if i change the language from the content in polylang I solve the problem of the single slug of the cpt entries (more important) but in the pages the MB fields are no longer translated, I use the function __ ('xx', 'textdomain') and I have translated everything, but it is as if the change of language does not recognize me ..
    can someone help me please?
    thank you

    #36736
    Long NguyenLong Nguyen
    Moderator

    Hi Marco,

    Thanks for reaching out.

    Can you please share some screenshots of the issue on your site? Do you mean the field title is not translated?

    #36738
    Marco CurcioMarco Curcio
    Participant

    I just discovered that even if the page is in English, if I do a var_dump of get_locale () inside the MB box it tells me that the language is still Italian, as if it were separate from the rest of the page

    #36739
    Marco CurcioMarco Curcio
    Participant

    img1
    img2
    img3
    all other translations work (except those of metabox)

    #36740
    Marco CurcioMarco Curcio
    Participant

    var_dump get_locale() inside filter rwmb_meta_boxes: it_IT
    var_dump get_locale() inside wp_head hook: en_GB

    same page

    #36741
    Marco CurcioMarco Curcio
    Participant

    if instead I use the pll_current_language () function inside the MB box it doesn't give me the language, so I guess I put the default one.
    The problem therefore is that the filter does not take the page language but remains the default one

    #36765
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thanks for your additional information.

    I'm going to check this issue and get back to you later.

    #36784
    Marco CurcioMarco Curcio
    Participant

    hi,
    did you find a solution?

    #36796
    Long NguyenLong Nguyen
    Moderator

    Hi Marco,

    Did you try to translate the hardcoded strings in a theme or a plugin with the PO file? Refer to this documentation https://polylang.pro/doc/how-to-translate-the-themes-and-plugins-hardcoded-strings/

    I've also tried to translate the field label with Loco Translate but do not see any issue like that.

    #36797
    Marco CurcioMarco Curcio
    Participant

    Hello,
    the whole site is translated with .po files, that's not the problem,
    if I set the language from the content: point 1 of https://polylang.pro/doc/url-modifications/

    it recognizes me the strings of the metaboxes in the po file, but it does not load me the translations in the frontend only of the MB. Everything else works.

    #36802
    Long NguyenLong Nguyen
    Moderator

    Hi Marco,

    It works as well on my local site, screen record https://monosnap.com/file/itLmSKdUyJNP9n4XEx3tFWl326AoaI

    You can also try to use this plugin to translate theme/plugin texts https://wordpress.org/plugins/theme-translation-for-polylang/

    #36809
    Marco CurcioMarco Curcio
    Participant

    here a video with the problem, i've also tried the plugin you suggested but doesn't work
    VIDEO

    #36830
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please share your site (or staging) credentials via this contact form https://metabox.io/contact/
    I will help you to investigate the issue.

    #38666
    jmcbadejmcbade
    Participant

    I want to use Polylang with MB and CPTs.

    Is this resolved?

    #38685
    Long NguyenLong Nguyen
    Moderator

    Hi jmcbade,

    Can you please create a new topic with your issue? And please share some screenshots, steps that you are trying to do but do not succeed. I will help you to check the issue.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.