How to set locale in a custom Struts 2 ActionMapper

前端 未结 2 702
悲哀的现实
悲哀的现实 2021-01-26 10:49

I have implemented a custom ActionMapper which obtains the locale from the URI (the URI itself, not the request parameters). From within ActionMapper.getMapping(), how do I set

2条回答
  •  不知归路
    2021-01-26 11:28

    you can use the provided I18nInterceptor when you set the param: request_only_locale

    instead of request_locale

    request_only_locale stores the locale only for the requests and does not touch the Session.

    Cheers, Christian

提交回复
热议问题