Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by Long Nguyen 1 year ago.

Assisted by: Long Nguyen.

Author Posts
November 16, 2023 at 12:29 pm #14826429

bjarteL

Hi,

I have reported an issue with automatic link translation here:
https://wpml.org/forums/topic/translate-link-targets-for-pages/

The topic is closed meanwhile, but we haven't solved it yet.

We tried your suggestions meanwhile and still have not solved the issue that links are not auto translated in lazyblocks pro.

We do have a dev environment registered as wpml dev page and I can share user details with you to have a look there.

Thanks"

November 20, 2023 at 3:21 am #14872521

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Bjarte,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

I would like to request temporary access (wp-admin and FTP) to your dev site to take a better look at the issue. Your next reply is set to private to share the info.
And let me know which Lazy block you want to adjust the internal link.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/

Look forward to your reply.
Thanks

November 28, 2023 at 1:51 am #14935531

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

If you add a block "lazyblock-ns-announcement" to a page and switch to Code editor, you can see the block structure:

<!-- wp:lazyblock/ns-announcement {"title":"test page","description":"test desc","button-text":"Read more1","button-link":"<em><u>hidden link</u></em>","blockId":"ZF3IOY","blockUniqueClass":"lazyblock-ns-announcement-ZF3IOY"} /-->

the code to register the button link for translation is:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="lazyblock/ns-announcement" translate="1">
      <key type="link" name="button-link" />
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Following the documentation https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

Also, the internal link is not adjusted automatically because there is a code in the file wp-config.php that defines the site URL.

define( 'WP_HOME', '<em><u>hidden link</u></em>' . $_SERVER['HTTP_HOST'] . '/' );
define( 'WP_SITEURL', '<em><u>hidden link</u></em>' . $_SERVER['HTTP_HOST'] . '/' );

I do not have the correct permission to edit the file, you can remove it and go to your site admin area > Settings > General > Update WordPress and Site Address URL to "hidden link" and check this issue again.

Look forward to your reply.
Thanks

Edit Page “WPML test page” ‹ Norstat — WordPress 2023-11-28 08-45-42.png
December 7, 2023 at 12:49 pm #15016821

bjarteL

Hi Long,

Thank you for looking into this issue.

I have adjusted the wp-config.php to "hidden link". I also added another block to the wpml-config.xml inside the Lazy Blocks Pro plugin using the plugin file editor in WordPress. I registered a new block like you said, using the code editor but unfortunately the automatic translation is still not working.

Could you perhaps now take another look at this after the changes i made.

December 8, 2023 at 1:49 am #15022339

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Please remove the code that defines the site URL in the file wp-config.php and setup the site URL in the admin area as I mentioned above.

If it still doesn't work, please give me permission to edit files on your site. I will try to investigate the issue further.

Another way, you try to replicate the issue on a clean installation of WordPress. With this link, you can login to the admin area directly hidden link

Kindly follow the steps below:

- Don’t restore your site there.
- Install LazyBlocks plugin.
- Try to replicate the issue with minimal steps.
- Then let me know the steps to replicate it.

Thanks.

The topic ‘[Closed] reopen topic 'translate-link-targets-for-pages/'’ is closed to new replies.