Multilingual URLs

Anton Grekhovodov asked on February 27, 2016 17:56

We’re developing a multilingual website. We’re using language prefixes approach. And we need to hide the language prefix for the default culture.

Could you please advise us how we can do it?
Example:
Site cultures - EN (default cultrure), IT
domain.com/products/1 - will be opened an english page
domain.com/it/products/1 - will be opened an italian page

We uses GetDocumentUrl method in transformations, so it must return correct url.

Correct Answer

Anton Grekhovodov answered on February 29, 2016 15:58

Thank you Trevor! Yes, we use culture prefix functionality, but prefixes are added into URL for all cultures. It's not what I want, because for english language the URL is www.domain.com/en/products.

So I've developed my own event handler which generates corrent URL.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on February 29, 2016 15:36

I believe you can use the Kentico Culture prefix functionality: https://docs.kentico.com/display/K9/Configuring+URLs+for+multilingual+websites

Using language prefixes for URLs If you do not own a different domain name for each language version of the website, but still want to ensure unique URLs for each culture without adding query string parameters, you can use language prefixes. Language prefixes insert a subdirectory into the URL in format

0 votesVote for this answer Mark as a Correct answer

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