It is not the Ajax refresh that is causing the language to default to english but the refersh data.
Raphael,
Thanks for your reply, It did not work for me. Let me provide a graphical representation of how we have our pages structured below:
To pin point when and where exactly the locale is being default to English I debugged the action that uses an ajax submit.
What I found out is that when using an
control on a container or a table it defaults that part of the screen that is being refreshed to English.
I have managed to find a possible solution, which to me is not the best solution, which is:
1. I call a function that I created that gets the selected user language from an espace that we are using to store the selected user language in a session variable. This function is being used also in the OnSessionStart event of the layout espace.
2. Then call the system action setCurrentLocale to set the language again. Which has already been done in the layout Espaces, because you are using the layout web-blocks from which the layout of the pages consists of.
This is not the best option, because:
1. I will need to go through the whole application and call that function prior doing an ajax refresh on a part of the screen.
Do you know another option to fix this, without doing the solution I have found above?
thanks,
Alexei