Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Disabling a language | Setting default for existing tenants #7728


User avatar
0
ajayak created

Hi,

On disabling a language from host admin, the language selection dropdown gets hidden for tenants which are using the disabled language. How can I set en as a default language for all the existing tenants?


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    How can I set en as a default language for all the existing tenants?

    You can use the code to change the tenant's LocalizationSettingNames.DefaultLanguage settings or directly modify the database's AbpSettings table.

  • User Avatar
    0
    ajayak created

    @maliming, I used the following SQL:

    Update AbpSettings Set Value = 'en' where Name = 'Abp.Localization.DefaultLanguageName'
    
    

    But this does not seem to work. The language is still different. Can you provide me the sql?

  • User Avatar
    1
    maliming created
    Support Team

    There is no problem with your sql statement, you may need to clear the cache.

    Please note that the default language setting is not the highest priority. See: https://aspnetboilerplate.com/Pages/Documents/Localization#how-the-current-language-is-determined

    When host disables a language, it can still be used by QueryString (culture=es-MX&ui-culture=es-MX), etc. I will investigate whether this behavior is a problem.

  • User Avatar
    0
    ajayak created

    Thanks maliming. It worked after clearing cache