'Why APEX_UTIL.GET_SESSION_LANG returns wrong value?

I have the following Apex 20.1 application

enter image description here

The app primary language is Frensh but configured to take the browser language preference to show the correct language.

My browser is in english and my app loads correctly in English however when calling the method : APEX_UTIL.GET_SESSION_LANG is always returns 'fr-fr' which is different from the language displayed.

To get the value of APEX_UTIL.GET_SESSION_LANG, I'm creating a page item with the source as follows :

enter image description here

Does anyone know why this value is different from the language loaded in the pages or what I'm doing wrong ?

Inside my code, I need to know the language displayed to the user to perform some language-dependant tasks.

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source