Add custom <a href> code

Hey,

I’m wondering is there any way that I can add custom code for a link on my site. In webflow the link options which I have is for External link, different page, section of page, email and phone. \

My problem is, I need the link to redirect the user to the same page but in another language. For example,

If the use is on the French pricing page and wants to go to the Spanish pricing page the link will take in the page they are on and redirect them to that page in spanish. At the minute it redirects to the home page in that language.

Thanks in advance for your support and help.

Emma

You can add the “Embed” element which is an HTML code embed:
https://s16.postimg.org/mxyauh6ad/embed.png

Then double click on the added element and write your custom <a> from the code editor:
https://s16.postimg.org/c4xoojw7p/link.png
Add your classes from there too as you normally would in any code editor, if necessary. :slight_smile:

I must remember you need a paid plan to use this feature.

… As for the language thing, I think this link may help you:
http://stackoverflow.com/questions/3084675/how-does-internationalization-work-in-javascript

There is an answer with some plugins you can use for localisation on the fly.
I think you are going to need JavaScript for this task, in one way or another. :neutral_face:

or you could direct the user to a PHP script which would then redirect to an appropriate page.

so…
<a href="language.php?lang=es>Espana
<a href="language.php?lang=fr>French

Select the FR href would open language.php with a param of fr

  • which would then redirect to a page with French text…

That’s if you use a different page per language.

Otherwise - I’ve seen a plug-in that “translates” the page

  • but I haven’t tested it to see how it affects SEO.

This topic was automatically closed after 60 days. New replies are no longer allowed.