Developer forum

Forum » Development » Add /de/ to URL for one language layer

Add /de/ to URL for one language layer

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

We have a situation where we need to add /de/ to only one language layer. 

So "domain.com/some/page" needs to be rewrited to "domain.com/de/some/page". Also all of product URLs needs to be rewritten like this. 

Would the appropriate solution be to do it with a URLProvider?

Regards / Aki


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Aki

You have 2 options:

1st option is to enable language layer for all websites and then on website settings for all other websites than /de, set this checkbox:

2nd option is to create a folder/top page on your German website called /de and place all pages under that:

Instead of

  • Some
    • Page
  • Products
  • ...

You do

  • de
    • Some
      • Page
    • Products
    • ...

I do not think a custom URLProvider is efficient to solve this. I think option 1 will do just fine.

BR Nicolai 

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

Thanks for the response. I'm not quite sure I follow the "enable language layer for all websites"?

/Aki

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

That is because I am babling....!!!

It is the "Include language layer" setting:

https://doc.dynamicweb.com/documentation-9/platform/platform-tools/customized-urls#3512

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Thought that it would be, just wanted to make sure it wasn't something I was unaware of. :) 

That solution should work. Thanks!

Regards / Aki

 

You must be logged in to post in the forum