This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: In the body I create a button using cssigniter shortcodes. Is there a way to have the links update automatically for the additional languages?

Solution: Please follow this steps;
- Go to WPML -> Settings -> Custom XML Configuration tab -> Add this code:

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>button</tag>
            <attributes>
                <attribute type="link">url</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

- Then edit the page where the shortcode appears -> Make a small change -> Save the changes -> Update the translation.

Relevant Documentation:

This topic contains 17 replies, has 2 voices.

Last updated by Carlos Rojas 7 months, 1 week ago.

Assigned support staff: Carlos Rojas.

Author Posts
January 14, 2019 at 3:19 pm #3088386

arnoldS-2

I have attached a screen grab of the editor. In the body I create a button using cssigniter shortcodes. Is there a way to have the links update automatically for the additional languages?

January 14, 2019 at 5:29 pm #3089164

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hello,
Thank you for contacting WPML support.

Please follow the steps described in the following link: https://wpml.org/documentation/support/language-configuration-files/#page-builder-content

Kind regards,
Carlos

January 14, 2019 at 7:31 pm #3089537

arnoldS-2

Do I need to include all the Uploads when I run Multilingual Tools Plugin in a local installation?

January 14, 2019 at 8:30 pm #3089617

arnoldS-2

I proceeded on a local site to follow the instructions here; https://wpml.org/documentation/related-projects/wpml-compatibility-test-tools-plugin/

Step 5 to Step 7 do not show the options as described and illustrated in your screen grab. I have attached mine (Translation_Management.jpeg) and yours (Duplicate-content.jpg) for comparison and await a solution.

Thank you

January 14, 2019 at 11:48 pm #3090025

arnoldS-2

I was able to go through the steps. I wasn't able to produce a configuration file. I think the settings in the custom fields for pages maybe needs to be changed as my gallery does not show up in translated pages. Can you please check and help me with this.

January 15, 2019 at 4:23 pm #3093950

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi there,

Please follow this steps;
- Go to WPML -> Settings -> Custom XML Configuration tab -> Add this code:

<wpml-config>
	<shortcodes>
		<shortcode>
			<tag>button</tag>
            <attributes>
                <attribute type="link">url</attribute>
            </attributes>
		</shortcode>
	</shortcodes>
</wpml-config>

- Then edit the page where the shortcode appears -> Make a small change -> Save the changes -> Update the translation.

Could you tell me the result of the steps above?

Regards,
Carlos

January 15, 2019 at 6:55 pm #3094438

arnoldS-2

Thank you for looking into this. I just want to make sure you understand what I am trying to achieve. In the Body Section of the Post there is the following Cssigniter Shortcode:

<h3 class="p1">[button url="hidden link" bg_color="#ab985a" fg_color="white" size="small" icon="fa-picture-o"]Click for thumbnail and full screen view[/button]</h3>

Is there a mechanism whereby WPML can tranlsate this out of the Body Section but also to be able to edit the link? Maybe not.

In any case without this feature, (even if I have to manually edit the link etc) the posts do not save in Hebrew at the moment.

The French and Hebrew offer 2 different editor options. Please look at the first post in the backend and you will see. The French can save a translation but not the Hebrew.

I don't mind if you do a complete reset to WPML and we start from scratch again as I have had problems with translating this site right from the beginning.

Of coarse keep original pages and posts in English.

January 15, 2019 at 7:14 pm #3094518

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi there,
Thank you very much for your message.

The code provided will allow WPML to automatically translate the URL inside the shortcode, so you won't need to manually add the translation of the URL. In case you desire to manually translate he URL then you only need to remove the 'type="link"' of the code provided.

Please add the code following the steps provided in my previous message and let me know if the issue is solved.

Regards,
Carlos

January 15, 2019 at 9:20 pm #3094814

arnoldS-2

So it works beautifully in French but not in Hebrew. Can you look into why it doesn't work in Hebrew. Please address this issue as requested in my previous message. I also attached screen grabs to illustrate your solution only works in French, however not in Hebrew.

Thank you

January 15, 2019 at 9:39 pm #3094844

arnoldS-2

In the French translation, with your solution, the button can be translated however there is no box to translate the body section of the page now. Please see the screen grabs (again).

Thank you

January 15, 2019 at 10:04 pm #3094897

arnoldS-2

Carlos

I thought about this further. I have no problem in translating the pages and posts using the Classic Translation Editor and publish the page and edit it to translate the body part in "translations manually".

I see this as a work around if you are not capable of adding a body section to the "Classic Translation Editor"

Again and I hope you are looking into it, is no method works to translate Hebrew.

Thank you.

January 16, 2019 at 12:19 pm #3097646

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi there,
Thank you very much for your messages.

In this case I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Best regards,
Carlos

January 16, 2019 at 7:39 pm #3099291

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi there,
Thank you very much for the information provided.

I tested the solution and the button texts appears correctly in the Classic Translation Editor, however when I try to save a page I get a fatal error. I recommend you to take a deeper look at this and contact the authors of the images functionality if necessary.

Also, I was able to double check that using the XML code you can't find any other simple text added in the body of the post. If you are planning to add more information in the body of the post besides the shortcode, then I recommend you this workaround:
- Add the text in the body of the post inside a 'made up' shortcode and add this shortcode to WPML -> Settings -> Custom XML Configuration. I made an example in the page hidden link so you can see it working.

Best regards,
Carlos

January 16, 2019 at 7:50 pm #3099303

arnoldS-2

Hi Carlos

No text shortcode exists for this Theme plugin. How about using a page builder and inserting the button code into one section and the text in another section below.

Shouldn't this work?

I suppose this is what Block Editor does. Should I try it with Block Editor first?

January 16, 2019 at 8:10 pm #3099340

arnoldS-2

My issue is not resolved. Thank you!