Open Closed

(Bug)Extended properties does not use Localization for Enum Type in the Angular App #7442


User avatar
0
n.uerkmez created
  • ABP Framework version: v8.2.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi, I have created a brand new Book App to be sure if the localization works for an extended property that is an enum by following the step in the https://docs.abp.io/en/abp/latest/Module-Entity-Extensions#special-types. But there is no way to get popup values from the localization file.

This is my localization of en.json

Extention of Identity Module

UserType Enum

UI Output (No Localization)

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

7 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hello,

    please check this doc https://docs.abp.io/en/commercial/latest/tutorials/book-store/part-2?UI=NG&DB=EF#localization

    I think try once with this one only

    as you are passing it both ways like-

    it might not be very clear, the correct approach should be "Enum:UserType.0": "Regular XXXXX",

    thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    n.uerkmez created

    Hello,

    please check this doc https://docs.abp.io/en/commercial/latest/tutorials/book-store/part-2?UI=NG&DB=EF#localization

    I think try once with this one only

    as you are passing it both ways like-

    it might not be very clear, the correct approach should be "Enum:UserType.0": "Regular XXXXX",

    thanks

    Hi, It did not work. I have tried every combination before creating this ticket. You can create a new Angular project and extend the Identity object with an enum as defined here https://docs.abp.io/en/abp/latest/Module-Entity-Extensions#special-types. You can experience, that it does not work as expected. I can not access the code of the ABP Identity Component + Template. So I can not change the localization code. Please check this issue, https://github.com/abpframework/abp/issues/13264 But it is not working for Angular

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    It works for me.

    my steps:

    • abp new TestApp -u angualr
     ObjectExtensionManager.Instance.Modules()
      .ConfigureIdentity(identity =>
      {
          identity.ConfigureUser(user =>
          {
             user.AddOrUpdateProperty<UserType>("Type");
          });
      });
      
    public enum UserType
    {
        Regular = 1,
        Moderator = 2,
    
        SuperUser = 3
    
    }
    
    "Enum:UserType.1": "Regular user",
    "Enum:UserType.2": "Moderator user",
    "Enum:UserType.3": "Super user"
    

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    n.uerkmez created

    Thanks yor your effort. But please double check your Type dropdown items's display text. It does not match localization text but just enum UserType name For example; Moderator display text must be "Moderator user" instead.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Yes, you are right

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    This is a bug, and i create an issue : https://github.com/abpframework/abp/issues/20165

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    n.uerkmez created

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.