This thread is resolved. Here is a description of the problem and solution.
Problem:
How to translate URL in php template or how to translate link in template? For example this:
Solution:
To add different links for each language, you can add links in the php template like this:
<?php if(ICL_LANGUAGE_CODE == 'en'){ ?> <a href="https://www.horizonhomes-samui.com/tag/awards/">...</a> <?php } elseif(ICL_LANGUAGE_CODE == 'fr'){ ?> <a href="https://www.horizonhomes-samui.com/fr/tag/awards">...</a> <?php } ?>
And you also need to translate that Tag and its related Posts into different languages. Then the translated Tags will show the translated posts like the one you have: https://www.horizonhomes-samui.com/fr/tag/awards
Relevant Documentation:
https://wpml.org/documentation/support/wpml-coding-api/
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 2 replies, has 2 voices.
Last updated by alexanderA 2 years, 3 months ago.
Assigned support staff: Noman.