Support Forum
Support › MB Frontend Submission › MB + Polylang
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
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?
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
var_dump get_locale() inside filter rwmb_meta_boxes: it_IT
var_dump get_locale() inside wp_head hook: en_GB
same page
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
Hi,
Thanks for your additional information.
I'm going to check this issue and get back to you later.
hi,
did you find a solution?
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.
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.
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/
here a video with the problem, i've also tried the plugin you suggested but doesn't work
VIDEO
Hi,
Please share your site (or staging) credentials via this contact form https://metabox.io/contact/
I will help you to investigate the issue.
I want to use Polylang with MB and CPTs.
Is this resolved?
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.