Forum Replies Created
-
AuthorPosts
-
Arno
ParticipantIt looks like the editor itself is standard WordPress. I found it is used in other plugins as well, e.g. Code Snippets. There, the Visual and Text tabs both work fine.
Arno
ParticipantHi Long,
Here's the screenshot: https://monosnap.com/file/f9PG6mqaFctX0prp6IawaOa0DCvNXX
All fields are created with the UI, not with code. I have the issue with all WYSIWYG fields.
If this is not enough information I can e-mail you a login to a copy of the site.
Arno
ParticipantHi Long,
Yes, I will use get_option(). That's issue 1. It would be great if you could find out issue 2 as well: randomly, some translated setting values were not returned until the field is re-added, while other fields work fine.
Please keep me posted about the progress.
Do you still need the test website to log into, or can I remove it?
Thanks!
Arno
ParticipantHi Long,
Thank you for sorting that out, and for the video. Indeed that makes the fields work!
We now have a way to fix this if it happens. What do you think the underlying problem is? What is actually causing this?
Unfortunately the other issue (https://support.metabox.io/topic/display-a-translated-setting-value-in-a-view/page/2/#post-38384) is not solved yet. I had hoped it was the same issue. I have used the field site_settings_texts_advanced_filters containing the text "More filters" in 3 Kadence blocks (accordion, text, button) in the same test page that you used. All work fine in English but no text is displayed in German.
I also added the field to the test view and that works fine for both languages.
I think there might be two issues:
1) If you search for "site_settings_texts_advanced_filters" in String Translations, it finds 5 entries. One entry would make sense.
2) In our views, we use your work around (https://support.metabox.io/topic/display-a-translated-setting-value-in-a-view/#post-38274) to retrieve the field values. Kadence is probably using another way, that should normally work too, but does not.Arno
ParticipantHi Long,
I know about the WPML icons, but that does not seem to be causing this issue. For example: I now added the field "site_settings_urls_start_page_promotions" to the test view. This field shows the pencil icon in WPML String Translation, so its translation is complete. Nevertheless, as you can see, the translated page shows the English value.
Why is that?
By the way, can you remove the link to your first screenshot as that shows the site. Thanks!
Arno
ParticipantHi Long,
Meanwhile, I found that another issue I have, is also caused by the bug we're discussing here. I was showing a value from a Meta Box settings field in a Kadence block, but it wasn't showing anything in the translated post. I asked Kadence for help, and they came back with this:
"I did a little test to see if meta box and WPML actually talk to each other. I added the metabox shortcode to output the text you've added in your site settings.
[rwmb_meta id="site_settings_texts_advanced_filters" object_id="site-configuration" object_type="setting"]
This did not output the translated text from your string translations on the German page. That tells me that Meta Box and WPML are not talking to each other and this isn't an issue with Kadence Dynamic content it's an issue of WPML not translating the output from MetaBox."
Arno
ParticipantHi Long,
I just e-mailed all details.
Arno
ParticipantHi Long,
Unfortunately I found an issue, even when using get_option. I have switched the field type to Text to keep things as simple as possible. But still, some fields return the translated value, while others return the English value. Both fields are Text, and translated.
Can I e-mail you a login? I have very simple test view you can take a look at.
September 20, 2022 at 1:27 AM in reply to: ✅WPML translation of Meta Box Select and Checkbox field #38355Arno
ParticipantHi Long,
Ok, thanks. I found a different work around by using the facetwp_facet_display_value hook of FacetWP: https://facetwp.com/help-center/developers/hooks/output-hooks/facetwp_facet_display_value/. Since it's a only a few strings, that are only used in facets of FacetWP, I was able to translate them in a custom script. For now, that seems to be the easier solution.
September 17, 2022 at 2:52 PM in reply to: ✅WPML translation of Meta Box Select and Checkbox field #38342Arno
ParticipantHi Long,
Sorry, I don't understand what exactly I need to do. It's only about two fields, but are you suggesting I should copy the PHP for ALL post types and taxonomies to a script? And then disable the extension "MB Custom Post Type" (or is that optional)? And then do that all over again for each config change in the future? That's not doable, but perhaps I misunderstood?
Please provide all steps you're suggesting to make these fields fully translatable.
If you can fix this in Meta Box that would be better. It's only two fields, so there's no hurry and I can wait for the update.
Thank you!
Arno
ParticipantHi Long,
Alright, we'll proceed with setting fields of the type Text instead of URL, translate them through WPML string translation, and read them through get_option as you explained. That's a work around that seems to be fine.
From pages like this: https://wpml.org/plugin/meta-box/ and this: https://docs.metabox.io/compatibility/, I was under the impression that WPML is fully supported for all of the Meta Box products. But if I understand you correctly, only the free Meta Box plugin for custom fields is fully supported. I purchased the full license for all extensions, but not all of that works.
Please do work on full support for WPML. It's essential for many websites.
My offer to give you a full site backup still stands. That gives you a way to see what's going wrong. It must be little things, as a lot works fine, but not everything.
Arno
Participant5) I tried creating a German version of the Setting Page. That seemed to help: all settings were now available in both languages. But if I changed one in German, it also changed in English!
I need your input here. Translating fields in MB Settings Pages seems quite difficult.
Arno
Participant4) The work around works fine for Text fields, but not for a field of the type URL: it only returns the English value but not the German value. I don't understand why. The URL field basically is a Text field, right?
Arno
ParticipantHi Long,
Thanks a lot, the work around works in my view as well. That allows us to continue the project.
A couple of questions please:
1) Is there documentation about how to use MB Views with WPML?2) What are the recommended translation settings? I now have Field Groups (meta-box) set to Translatable. Also, Views (mb-views) is set to Translatable. Is that correct?
3) Can you try and get this fully solved, so I can eventually use the normal (and shorter) Meta Box syntax to display the translated settings? I can give you a full copy of the project for local debugging. Meanwhile, I will use the work around.
Arno
ParticipantCan you get me an update of the status? Many thanks!
-
AuthorPosts