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

Default Language #3108


User avatar
0
fguo created

I am trying v4.0 (Core+Angular), and a little confused about "Default Language".

On Administration > Languages page, there is a column with header of "Default*". All of original 10 languages show "Yes". On the bottom of this page, there is a note:"* Can not edit or delete default languages." I guess the "Default Languages" here means "Built-in languages". Am I correct? :?: If so, where is it marked as "Default Languages"? :?: I checked AbpLanguages table, and no clue which column is for "default". Ultimately, is it possible to hide specific languages to users (remove from the dropdown)? :?:

In the "Actions" dropdown, there is an option "Set as default language". If I set a specific language "as default" here, the language name is modified by ending with "(Default)", but what does it affect? :?: I tried to login with another user or re-login with Admin, and nothing changed. The language is still English.

On the top bar, I tried to select a language other than English. It changes the font on screen after an automatic refresh, which is correct. However, if the user login next time on another machine or browser, the "Default" language is still English. Is it possible to remember the user's choice of "default" language? :?:

Thanks,


3 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    " Can not edit or delete default languages" -> I think you are using multitenancy enabled. If so, tenants can not delete host defined languages (host defined languages are default here).

    "Ultimately, is it possible to hide specific languages to users" -> From host side, you can delete languages (for multitenant applications). In addition, rendering language dropdown is in your solution and you can change the code however you like.

    Current default language system has problems with AspNet Zero. I created an issue that explains current system and improvements: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2103">https://github.com/aspnetboilerplate/as ... ssues/2103</a> We will do it in the next release.

  • User Avatar
    0
    fguo created

    The multitenancy is disabled in code MultiTenancyEnabled=false. I did this by following the instruction on "Getting Start" document. There are still two "admin" users in AbpUsers table, one with TenantId=1 and another with TenantId=null. However, I cannot login with admin whose TenantId=null.

    Thank you for your improvement plan. I expect it on the next release. :)

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @fguo,

    The user with TenantId=null should not exists in database when you disable multi tenancy. This can be a good enhancement for the next release as well if we can do it.

    But as far as I remember, the problem was getting the value of multi tenancy is enabled or not while running EF migrations.

    Thanks.