
Tagged: shortcode, translations, wpml, WPML Config File
-
AuthorPosts
-
April 1, 2025 at 5:39 pm #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.
April 2, 2025 at 6:05 am #1480613Hey 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,
IsmaelApril 2, 2025 at 5:38 pm #1480655Ismael,
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 10 hours, 33 minutes ago by
envis.
-
This reply was modified 10 hours, 33 minutes ago by
-
AuthorPosts
- You must be logged in to reply to this topic.