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 topic contains 1 reply, has 2 voices.

Last updated by Bruno 4 months, 3 weeks ago.

Assigned support staff: Bruno.

Author Posts
May 23, 2019 at 2:07 am #3870183

margusK-5

How to make a href redirect to proper languages, not only to hardcoded ones?

<a href="hidden link">Contact us</a>

May 23, 2019 at 3:39 am #3870959

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Thank you for contacting us. I would be very happy to help you but I didn't fully understand what is the issue.

Do you want to translate a URL like the one you posted? If yes, you can test as below:

echo '<a href="' . esc_url( __( '<em><u>hidden link</u></em>', 'your-domain' ) ) . '">' . __( 'Contact us', 'your-domain' ) . '</a>';

Then re-scan your theme or plugin (WPML > Theme and plugins localization). Now you should be able to translate this URL into WPML > String Translation.

Please, let me know if I can help with any other questions you may have about it. I'll be happy to help.

Thank you.