Closed craftyweb closed 4 months ago
@jptissot is there anything to make this happen, I remembered we can use alias pattern for that
@hishamco Would be great if you have an example of that. Now I define custom routes in my StartUp.cs class. I use the pattern {culture}/webshop/{controller}/{action} to go to the correct controller and action in the correct culture
Hmm I am not familiar with the pattern when using custom controllers. I would need more information about your CulturePicker implementation.
@jptissot I’ve made a custom feature to override the ContentCulturePicker shape so when I click on a culture I will go to a custom controller.
In this controller I would like to check if there is a culture in the url. Then I would like to redirect to the same url with a different culture.
example: I’m on ~/en/webshop and I select “nl” from the culture picker. The controller received ~/en/webshop as url and “nl” as targetCulture. Then I would like to redirect to ~/{targetCulture}/webshop.
In this controller I would like to check if there is a culture in the url. Then I would like to redirect to the same url with a different culture.
Isn't it exactly what the current culture picker and its associated controller already do?
HI, I have a multilingual website with translations of content items, but I have also custom pages via controllers. Is it possible to redirect to the correct url via the Culture Picker shape?
Example of what I get now:
I go to the overview page of my webshop. ~/en/webshop
The English translations of the product are shown.
When I change the culture with the Culture Picker to Dutch the Dutch translations are shown, but the url is still ~/en/webshop instead of ~/nl/webshop
What am I doing wrong? What is the easiest way to fix this?
Thanks!