Change Locale getting Reset

  

Hi,

I have made my application multi lingual. I have different tenants for different countries, each tenant is linked to a default language. 

When a session is started I identify the tenant and change the Locale using the SetCurrentLocale action, everything is good until this point. I can navigate between pages and there is no problem.

The problem comes whenever I save or edit something, at first the locale is not changed I guess because it's an ajax refresh, but if I were to refresh or go to another screen it goes back to the Default Application Locale which is english.

I have set breakpoints where I set the locale, and it is not hitting them, so I don't know what is causing my session locale to get reset.

If anyone has any input I would really appreciate it.

Hi Andres,

    usually location is not related to tenant. The OS application supply the language according the language set in the browser. 

   The tenant is only an option to "reset" the database for new users (tenants).

At least, this is my understanding.

Luck

Luciano Schiavo wrote:

Hi Andres,

    usually location is not related to tenant. The OS application supply the language according the language set in the browser. 

   The tenant is only an option to "reset" the database for new users (tenants).

At least, this is my understanding.

Luck

Hi Luciano,

Thanks for the response.

Yes, but it happens to be that for my application each country will be a tenant (they have their own data), that is why I am able to default the language based on that. 

The main problem is that even if I Set the Locale to a different one using a Language Bar, after I do any kind of save if I refresh it goes to English.


Hi Andres,

  have you tried to use the TenantSwitch ? It will do all job regarding the Site.TenantId that must be associated to the user after login.