javaoraclejpainternationalizationnls-sort

Oracle dynamic NLS_SORT with openjpa


i have a application where every user can choose a language in usersettings. Now i want set this language for NLS_SORT. I could send this "language" within every order-by query but i think that is not a good solution. I want set it after user login, but i didn't find any solution for this via google. Can someone help me with it or give me a better alternative for this? I thought every multilanguage application should have this problem, but i found insufficient informations and solutions about it.

Thank you for your time.


Solution

  • Run a SQL statement like this after the user logs in:

    alter session set nls_sort = 'FRENCH';