Display a translated setting value in a view

Support MB Views Display a translated setting value in a view

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #38371
    ArnoArno
    Participant

    Hi Long,

    I just e-mailed all details.

    #38384
    ArnoArno
    Participant

    Hi 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."

    #38392
    Long NguyenLong Nguyen
    Moderator

    Hi Arno,

    Now you can see the second URL is translated as well, screenshot (removed)

    You can check whether the translation is completed or not by checking the icon "pen" or "circle arrows", screenshot https://monosnap.com/file/EAyVJy42XLpBJuihNbtvumdXVOca93

    #38393
    ArnoArno
    Participant

    Hi 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!

    #38407
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I've checked the field site_settings_urls_start_page_promotions on your site and the value to translate is not correct, then I re-add this field to the String translation and it is translated as well. I send the screen record via the ticket.

    #38411
    ArnoArno
    Participant

    Hi 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.

    #38450
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I'm not sure why the helper shortcode or helper function rwmb_meta() is not able to display the translation strings in other languages on your site. I've informed the development team to take a look at this case.
    Meanwhile, you can create your own shortcode to display the field value and use the WordPress function get_option() then add the shortcode to the Kadence block, just like the helper shortcode [rwmb_meta]. Please read more on the documentation https://codex.wordpress.org/Shortcode_API

    #38451
    ArnoArno
    Participant

    Hi 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!

Viewing 8 posts - 16 through 23 (of 23 total)
  • You must be logged in to reply to this topic.