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: Translate images links targets in salient Image Gallery

Solution: https://wpml.org/forums/topic/translate-images-links-targets/#post-4066507

This topic contains 18 replies, has 2 voices.

Last updated by P1X3L0V4 3 months, 1 week ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
June 17, 2019 at 7:40 am #4032823

P1X3L0V4

Hello! I have a Portfolio page with gallery module where each image links to a single portfolio subpage (img > link > portfolio page). It works fine on basic language version - each link on PL Portfolio page targets to PL subpages.

I am struggling to translate those links on EN Portfolio Page. I have tried these things:

1. Translate gallery module via Translation Manager but it is not visible there.

2. Translate gallery module manually (hardcode) via changing page language in top bar - I can edit gallery module link targets but when saved both language version links are updated - PL & EN so there I have EN links on PL Page.

3. Settings -> Translate Link Targets. Scanning results are empty, nothing translate-worthy can be found.

4. Sticky Links. Tried scanning all posts, nothing found.

Theme: Salient
Plugins up to date
I believe that the field I'm trying to translate is custom theme but still it should be compatible with WPML.
Potroflio PL: hidden link
Portfolio EN: hidden link

What am I missing here?

June 17, 2019 at 8:20 am #4033115

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

Could you please let me know which plugin is adding the image URL function for the media? Can you provide more details about the way you added so I can check further?

Look forward to your reply.

Thanks

June 17, 2019 at 9:27 am #4033943

P1X3L0V4

Hello Shekhar,
Salient theme (hidden link)
has a gallery module (WPBakery builder). Portfolio section with game covers is prepared with use of this module. I belive that Image URL visible on the screen in my first post is a part of this theme's gallery module. Although theme is compatibile with WPML so there should be a way to translate this field. I can provide You a temp login data to webpage admin panel so You can look at the module in the backend.

EDIT
It's possible that I found custom field in WPML Settings (screen) but after changing it to "Translate" and saving I still can't find those fields in Translation manager

June 17, 2019 at 12:02 pm #4035149

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Sure, to debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

June 18, 2019 at 4:41 am #4040237

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I am creating a duplicator package to debug this issue further. Will respond to you soon.

Thanks

June 18, 2019 at 6:58 am #4040781

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

I can confirm the issue and it's a compatibility issue, I have escalated this issue to our compatibility team for further help.

The process includes contacting the author and working for the fix. Being so, this process may take a while as it depends on how soon the author will reply to our efforts to contact them.

Also, our compatibility team normally provides a workaround in possible cases, so I will share the workaround if it’s provided by the compatibility team.

Thank you.

June 18, 2019 at 8:50 am #4041493

P1X3L0V4

Thank You for the update!
There was a major update for the Salient Theme v. 10.5.2 so I installed it. So far I looks like it does not fix the issue but I will let You know if anything changes.

June 19, 2019 at 3:56 am #4047851

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Could you please provide the latest version of the salient theme too, So I can send the latest one for further debugging?

You can zip those file and share us in the next private reply.

Look forward to your reply.

Thanks

June 19, 2019 at 6:52 am #4048455

P1X3L0V4

Theme attached. Here is a link to important update info: hidden link

EDIT. Was the file send correctly?

June 21, 2019 at 11:10 am #4066507

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Our compatibility team suggested a workaround so could you please try it and let me know if that helps?
- Backup your site
- Login to FTP
- Go to \plugins\salient-core\includes\vc_templates\vc_gallery.php
- Find

foreach ( $images as $attach_id ) {
    $i++;

- Add the following afterwards

$attach_id = apply_filters('wpml_object_id', $attach_id, 'attachment');

Let me know if this helps.

Thanks

June 24, 2019 at 9:16 am #4075933

P1X3L0V4

Hello,
Thank you for the update. I added a code fix mentioned above to the vc_gallery.php file but I doesn't seem to solve the problem.
1) The fields with url adresses are not visible in Translation Manager (re-saved Portfolio page)
2) I cannot find URLs to translate them in String Translation
Please let me know what would be the best way to proceed? Am I missing something?
Should I try to hardcode translate those links by manually editing page (changing a flag in top bar)?

June 24, 2019 at 9:45 am #4076107

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Should I try to hardcode translate those links by manually editing page (changing a flag in the top bar)?

Yes, you should translate those links from the media library, you can try to go to the media library once and see if those links are available, if yes, change the language and translate the links.

If the links aren't available in media library then you should try to manually edit the pages and translate those links.

Let me know if this helps.

Thanks

June 24, 2019 at 10:41 am #4076595

P1X3L0V4

1) Those fields are not visible in WPML Media Translation (screen)
2) When I hardcode translate gallery URLs on EN page the link is updated for both languge versions like before (so I can have English links on both language versions or Polish links on both language versions).
Can You please check it out further?
Thank You in advance...

June 25, 2019 at 3:33 am #4081181

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I have informed about this to our compatibility team. I will update you as soon as I will have further feedback.

Thanks

June 26, 2019 at 5:07 am #4089089

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

I am just changing the ticket status, will update you as soon as I will have further feedback.

Thanks