Base solution for your next web application
Open Closed

How Can I Set defualt Language? #2024


User avatar
0
omital created

Hi. I did this for set 'fa-ir' for default language:
1: just add this line of code in PreInitialize method

Configuration.Localization.Languages.Add(new LanguageInfo("fa-IR", "Farsi", "famfamfam-flag-ir", true));

2: and this in seed data

new ApplicationLanguage(null, "fa-IR", "فارسی", "famfamfam-flag-ir"),

also read this topic "Configuring Default Language For Application" in forum. But noting work?! when user load page for first time default language is "en", and user have to click on link [http://something:6234/AbpLocalization/ChangeCulture?cultureName=fa-IR]) in order to change the language. and this is screenshot from coockies


3 Answer(s)
  • User Avatar
    0
    omital created

    anybody?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This problem should be solved with this issue <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1595">https://github.com/aspnetboilerplate/as ... ssues/1595</a>. Can you try it after the release of ABP v1.1 ?

    Thank you.

  • User Avatar
    0
    gabrielrb created

    I use "update-database", on the package manager console.

    It seeds the database, and set the default language.