Deprecated at least since 4.3

The documentation below is deprecated at least since Datafari 4.3

Starting with Datafari 3.2.0, user's preferred language is now automatically saved and applied when a user connects to Datafari or changes the language.
The language info is stored in the 'lang' table of the Cassandra database. This architecture follows the logic that was implemented by the 'Likes and Favorites' feature.

The 'lang' table is composed of two columns:

The preferred language is saved/applied in several cases :

1) User connection

When a user successfully authenticates himself through the 'login.jsp' page, he is redirected by the jsp code to the servlet 'applyLang' (GET HTTP method). The servlet class is 'com.francelabs.datafari.servlets.ApplyUserLang'. 
The servlet try to find a corresponding entry in the 'lang' table of the Cassandra database thanks to the username. Two possibilities :

2) User changes the language

When a user changes the language of Datafari, an ajax call with a HTTP POST method is done to the 'applyLang' servlet with the selected language as POST data. The servlet simply creates/updates the username entry (if the user is authenticated in Datafari) with the provided language in the 'lang' table of Cassandra

3) Language keeper

The 'main.js' script has been updated to ensure that the 'lang' parameter provided by the url corresponds to the preferred user language.
To do so, an ajax call with a HTTP GET method is performed to the 'applyLang' servlet to retrieve the user preferred language. Two possibilities :