I might be mistaken here… I just made the link in my footer an ACF field and TranslatePress still is not letting me translate it. This leads me to believe that TranslatePress may have an issue. (I haven’t tested other translation plugins)
I suspect part of the issue might be that you are hardcoding the links into the PHP template files. If I’m not mistaken, TranslatePress can only translate links that are managed by the WordPress CMS. From the little bit I can see in your video, the template you made seems to be crafted more like a static web page that is being displayed with WordPress than a WordPress template that is using the CMS.
Here is a link that was created in the Gutenberg editor and is fully translatable:
Thanks for your reply. Yes i tried Gutenberg also and those links are fine. But hardcoded links in the php template files doesn’t work. The hardcoded images in the php template files work just fine. So it seems that TranslatePress has a bug. It seems to handle link tags as Gettext. In the settings of TranslatePress you can exclude Gettext strings.
If you put the text of the links in there then it works in TranslatePress. Found this workaround later. Still no answer from them. But pretty sure it is a mistake from their side. I see no reason to handle links as Gettext.
So i am not getting far with TranslatePress… Not super impressed with their support…
This is on of the most recent replies from them:
"That’s correct, it’s not detectable to be translated in the way you specified.
In your case, the content is an article uploaded as an attachment and it’s not detectable. If it was written on a page that could be translated, then its URL would have been translated automatically.
To make this work, you need to change the URL directly from your code, based on the currently displayed language. On this page you’ll find the conditional language shortcode: Conditional Shortcode Based on Language - TranslatePress but on the same page there is also a snippet that shows you how to get the current language in PHP. Try to use that and provide the correct link based on the current language."
I think i was pretty clear in my video on how it is set-up. I even explained in detail what i created and what the problem is. But this is the answer i got…
I explained it again and told them you’re example of the footer link also. And that everything else is translatable just fine. It only seems to be links where we need to change the URL. Like links to PDF’s and other docs or links to external websites.
I don’t see any other way on how i can set it up differently? And me or you with the footer link are not doing anything unique right? Seems to be just standard WordPress PHP files.
Anyway just thought i would lt you know and maybe you have another idea on how to tackle this.
Not an ideal solution, but at least it’s something. At the end of the day, though, hard coding links into the theme files probably isn’t a great practice. Maybe consider using ACF fields on the relevant pages to store the URLs and retrieve them from the theme template?