mercredi 6 janvier 2016

URL path for multi-language

I have the existing web app (Spring MVC). I need to make i18n for all the contents.

The requirement for managing the language is to use language code directly in the URL. So for existing URL:

http://ift.tt/1JtoHPc

I will need to create N virtual URLs like

http://ift.tt/1JtoFXy
http://ift.tt/1JtoFXC

I'm investigating the different option to achieve this. One dirty solution I found is to use the interceptor which will check the language code in the URL, removing the language code, to make a valid URL and set the Redirect. But it's so ugly...

What is the best approach to implement this?




Aucun commentaire:

Enregistrer un commentaire