Refuse deleting the default language #23217

Back

Volobox task: VolosoftWorkspace#1867

Description

On Language Management > Languages, the default language could be deleted: the UI offered Delete and the server accepted it.

  • LanguageAppService.DeleteAsync now refuses the default language with a BusinessException (Volo.Abp.LanguageManagement:010002): " is the default language and cannot be deleted. Set another language as the default first." (en + tr texts added; other cultures fall back to English).
  • MVC, Blazorise, MudBlazor and Angular no longer show Delete on the default language row.
  • Tests: DeleteAsync now deletes a non-default language; a new DeleteAsync_Should_Refuse_The_Default_Language test covers the refusal.

Note: the existing DefaultLanguageDeletionConfirmationMessage is left in place, since removing it would be a breaking change for overrides; it is simply no longer reached from the built-in UIs.

How to test it?

  1. Sign in as admin and open Language Management > Languages.
  2. The default language's Actions menu has no Delete; other languages still do.
  3. Call DELETE /api/language-management/languages/{defaultLanguageId}: it returns 403 with the message above, and the language stays.

dotnet test for LanguageAppService_Tests: 11/11 passed. The Blazor and MudBlazor projects build; the Angular package was not built locally.

🤖 Generated with Claude Code

Version
11.0.0-rc.3
Release Date
17 November, 2026
Labels
No labels
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.