When changing language in DSpace, all GET parameters of the current URL are dismissed and replace by the 'locale=<lang>' parameter. Relevant code: https://github.com/DSpace/DSpace/blob/9c16711dbef079e9eee55b660997b52adf487354/dspace-jspui/src/main/webapp/layout/navbar-default.jsp#L138
This leads to odd behavior, since the language change dismisses current searches, etc., and can change the whole context
Steps to reproduce:
- Execute a search in DSpace
- View search result
- Change language
- Search result is dismissed
I've already created a pull request, which addresses this issue: https://github.com/DSpace/DSpace/pull/2285
Instead of replacing all GET parameters when changing language, only the 'locale=<lang>' is added to the current URL or updated.
The function responsible for this can be used with arbitrary GET parameters.