translation fails on ajax refresh

translation fails on ajax refresh

  

Hi,


I have a refresh of a container which holds text. the text is translated first time the contianer loads.

The container loads depending on (wrong) input of form field.

When the form field is changed to correct input the container is hidden (no message is shown).

When then again the input is wrong and the container shows it shows the original text instead of the translated text as it did the first time.

Why does this happen and how can I fix it?


Hi Edwin,


How is the translation being done? Is it the builtin translation features of the platform or are you doing it manually during the page rendering?

Also can you upload a sample module that replicates the issue?


Regards,
João Rosado

I am using the build in translation feature.

Solution

This can be solved setting the application default language on session start instead of doing it on the preparation of the web screen. You can find the solution here.

Cheers!

Solution

Hi Guilherme,

I'm having the same issue described above, but we are using the OnSessionStart system event. and the language are being set, but when doing a save based on an ajax_submit and we call the ajx refresh to refresh part of the screen it defaults to english anyway.

One thing is that we have the on sessionstart at the espace where the web-block resides and not in the espace which is calling the pages ( which are based on the web-blocks that we have defined in a layout espace).

Does every espace that contains pages have to have their own OnSessionStart system event?

our page structure is the following:


We have placed the OnSessionStart in the Layout espace and not in the User espaces...

I have called the setCurrentLOcale system function also in the OnBeginWebRequest it did not work. I did the same in  the user espace OnBeginWebRequestit did not work either


The only way it works if I call the System Action SetCurrentLocale before doing the


regards,


Alexei


===== UPDATE====

It is not the Ajax refresh that is causing the language to default to english but the refersh data.

In actions that uses the ajax submit method and uses the Refresh data is causing that,

Because on other actions that uses the ajax submit as a method, and don't have the refresh data, but have the ajax refresh it works well. 

===============


Alexei wrote:

Hi Guilherme,

I'm having the same issue described above, but we are using the OnSessionStart system event. and the language are being set, but when doing a save based on an ajax_submit and we call the ajx refresh to refresh part of the screen it defaults to english anyway.

One thing is that we have the on sessionstart at the espace where the web-block resides and not in the espace which is calling the pages ( which are based on the web-blocks that we have defined in a layout espace).

Does every espace that contains pages have to have their own OnSessionStart system event?

our page structure is the following:


We have placed the OnSessionStart in the Layout espace and not in the User espaces...

I have called the setCurrentLOcale system function also in the OnBeginWebRequest it did not work. I did the same in  the user espace OnBeginWebRequestit did not work either


The only way it works if I call the System Action SetCurrentLocale before doing the


regards,


Alexei