Replacing URL Prefix with the language used in the webpage

0
my mendix webpages are rendering webpage in multiple content but in same url. Do we have a way to replace the "URL Prefix" provided by mendix ("/p") .so that i can have URL prefix value set to "/en" for my english content and "/ar" for my arabic content for the url of the same page.
asked
2 answers
1

Hi,

there is a constant RequestHandlerName  which you can change from "p" or "link" to something else 

but to make dynamic based on user's language won't be possible

It requires creating java action for custom request handler and calling it at startup microflow but i wouldn't recommend it as it will be complex

image.png

 

Hope it helps!

answered
1

Sharad's suggestion of using a request handler would work, but if you don't want to have to write your own Java action, you could just change the naming structure for your pages.

 

For example, if you have an English page called test, you could set the URL of the page to be /en/test. This would then be accessible from /p/en/test.

 

If the Arabic test page had the URL set to /ar/test, then this would be accessible from /p/ar/test .

 

So you have to keep the /p part, but it would be simpler to implement, and it would meet your requirements.

 

I hope this helps. Good luck!

answered