最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

multi language - Replace the page url with a menu link?

programmeradmin0浏览0评论

i want to make a multilangual site, where the secondary language is a copy of the site in a different folder. For example:

  • Primary language url: example
  • Secondary language url: example/en

So there are two websites with the same content, only the language and the directory are different.

I want to create a "language switcher menu item" that dynamically changes the page url. For example:

  • if i'm on the example/about page after clicking the "language switcher menu item", i want to go to the example/en/about page.
  • so all it have to do is that this menu item dynamically changes the current page's url (it replaces the original domain from example/ to example/en), and it does not modify the rest of the url (the url structure on the two sides is of course the same)

I hope I have been able to describe it clearly.

Thanks for the help in advance!

发布评论

评论列表(0)

  1. 暂无评论