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
Hope it helps!
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!