Custom URL on multilingual website pages

L B asked on June 20, 2017 12:44

Version: Kentico 9

Problem: Cannot have the same custom URL for the same page in different languages.

Hi,

My company just upgrade the Kentico 9 version to be able to translate the pages easily. We would like to use the prefixed URL format to have something like:

xxxx.com/about-us -> for the english page xxxx.com/en-AU/about-us -> english as well xxxx.com/xx-XX/about-us -> for the translated page

We do able the URL prefix properly, everything is fine except that the custom URL don't let us use the same URL for the both pages.

For each page we copy from english to the other language it change the url adding either a number (for custom URL) or the translation code '-xx' at the end (for the non custom URL pages).

I did try to disable the custom URL for one, then both of them. But when we try to set the same URL for the translated page, kentico keep add the suffix. I can't find anything mentioning this behaviour in the documentation.

Here is a picture showing the problem on the comparison UI

Image Text

Is there a way to make it works as we expect ?

Thanks, Cheers

Correct Answer

Jan Hermann answered on June 21, 2017 10:21

And here is the Urls section:

https://ibb.co/hAJDJQ

1 votesVote for this answer Unmark Correct answer

Recent Answers


L B answered on June 20, 2017 13:11

I find the documentation about the custom URL on multilingual, at the bottom of the page:

https://docs.kentico.com/k9/multilingual-websites/setting-up-multilingual-websites/configuring-urls-for-multilingual-websites

Hopefully it will solve my problem, even if I think that it is quite dodgy, it disable the ability to use query to get the path (you will need to get the alias instead)

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on June 20, 2017 21:42

If you tick that Use custom url path checkbox and clear the Path or patter field, then the NodeAlisPath is used for the url and since its related to node, it's shared across all of your culture versions, so it would work as you wish.

0 votesVote for this answer Mark as a Correct answer

L B answered on June 21, 2017 01:48

Thanks for the answer Jan,

But that does not fit the expectation. Maybe I misunderstood, if we use the custom url it is to avoid using the NodeAliasPath since it's not the url wanted.

It would work on the screenshot sample I make just to post here but for something as simple as the home page, by doing what you suggest I end with '/home' instead of '/' for the translated version or '/1' if I uncheck the custom URL checkbox. The tutorial sample only works because it use /Home as homepage...

I just tried adding Aliases, it does not seems to work neither...

I cannot believe that I am the only one who end with this problem, it must happens before already, it seems so standard.

Any other idea/option ?

Thanks, Cheers.

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on June 21, 2017 08:00

The approach I described should almost work as you wish except for the default culture. In this case there will be always a language prefix present:

cultures

https://ibb.co/bNZZa5

0 votesVote for this answer Mark as a Correct answer

L B answered on June 21, 2017 09:17

Hey Jan,

Can you show me a sample with custom url which are different from the name, and therefore the node path ?

Thanks, Cheers

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on June 21, 2017 10:04

I am not sure I follow. Do you mean something like this?

https://ibb.co/mE0Psk

0 votesVote for this answer Mark as a Correct answer

L B answered on June 21, 2017 10:14

Damn, you made me dream, but then I realize it is twice the English panel ^^

This is exactly what I want but with 2 differents languages :)

If you made it, can you please also show a picture of your URL panel.

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on June 21, 2017 10:19

Oh, I am really sorry for that. Here it is:

https://ibb.co/cXJfyQ

0 votesVote for this answer Mark as a Correct answer

L B answered on June 21, 2017 10:29

I would hug you right now if you were near :)

It is a weird way to do but it is a working solution without real constraints, so perfect.

Thanks a lot Jan Cheers.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.