Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1480589

    I am using the WP Booking System plugin together with the Enfold theme. WP Booking System does not support WPML, but it allows me to create the booking form in 3 languages. I need to insert a slightly different shortcode in the editor (lang=en, lang=de etc.) per language.

    [wpbs id="1" language="nl" title="no" legend="yes" legend_position="side" display="1" year="0" month="0" language="auto" start="1" dropdown="yes" jump="no" history="1" tooltip="1" highlighttoday="no" weeknumbers="no" show_first_available_date="no" form_id="1" form_position="bottom" auto_pending="yes" selection_type="multiple" selection_style="split" minimum_days="0" maximum_days="0" booking_start_day="0" booking_end_day="0" show_date_selection="no"]

    So I create a WPML config file in the root folder of my Enfold child theme with the following content:

    <wpml-config>
      <shortcodes>
        <shortcode>
          <tag>wpbs</tag>
          <attributes>
            <attribute>id</attribute>
            <attribute>language</attribute>
          </attributes>
        </shortcode>
      </shortcodes>
    </wpml-config>

    I reopened the page, updated the content, but I can still not change the German and English page through the Advanced Translation editor.
    Do you have any clue what I am doing wrong?

    PS. I have tried this solution with both a content block and a code block, both don’t give me any result.

    #1480613

    Hey envis,

    Thank you for the inquiry.

    Have you tried placing the shortcode inside a Text Block? You should be able to translate the content of the Text Block element in the WPML Translation Editor. If this doesn’t work, please provide the login details in the private field. For additional assistance, please contact the WP Booking System plugin developers.

    Best regards,
    Ismael

    #1480655

    Ismael,

    I asked WPML and they came up with this solution.

    So I expect that because of this XML, I would see an ID and LANGUAGE attribute that I can change with WPML per language version. But I do not.

    Greetings,
    Gerben

    • This reply was modified 1 day, 6 hours ago by envis.
    #1480687

    Hi,

    Thank you for the info.

    We would like to try to override the wpml-config using the dedicated field in WPML > Settings (https://wpml.org/documentation/support/language-configuration-files/overriding-language-configuration-files/), but a script error prevents us from saving the changes. This is the error:

    Uncaught SyntaxError: Unexpected token '<' (at https://site.de/?wpml-app=ate-dashboard&ver=472900:8:1)
    
    Line:8
    
    ateDashboard(params);
    <pre style="padding:1em; background-color: #f8f8f8; color: #0a001f"><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
    <shortcodes>
      <shortcode>
        <tag>av_codeblock</tag>
        <attributes>
          <attribute>alb_description</attribute>
          <attribute>av_uid</attribute>
          <attribute>codeblock_type</attribute>
    

    This might also be the reason why the Text Block and other elements are not translatable. Please forward this error to WPML support and once the issue is fixed, try to delete the wpml-config.xml file in the child theme folder, then transfer its content into the WPML > Settings > Custom XML Configuration tab.

    Let us know the result.

    Best regards,
    Ismael

    #1480704

    Maybe this was a human error. The wpml-config.xml was missing from the enfold theme folder. I have put it back there. Can you try again? Or does it have nothing to do with it?

    #1480707

    Hi,

    We actually removed the code from the config file for testing. Please try to completely remove the wpml-config.xml file, then paste its content into WPML > Settings > Custom XML Configuration. You may need to forward the error to WPML support first.

    Best regards,
    Ismael

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