Open Closed

Unable to localize the filter menu's text #10052


User avatar
0
dcsimoes created

Hello. I'm being unable to localize the filter menu's text on Filter Menu, is this a known issue or am I missing something?


7 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    1. Solution
    • In LeptonX Angular, the text “Filter Menu” comes from the LeptonX localization resource. To change/localize it, add a localization entry under the LeptonX resource in your application and ensure Angular loads dynamic localizations.
    • Option A: Use the Localization Management UI (Administration > Localization > Texts)
      • Resource: LeptonX
      • Key: FilterMenu
      • Base Value: Filter menu
      • Value: Your translation (e.g., Filtrar menu)
      • Then refresh the app. The button label will use the new value.
    • Option B: Seed it in code (backend)
      • Add/override the text in your DataSeedContributor with the LeptonX resource:
    public class MyDataSeedContributor : IDataSeedContributor, ITransientDependency
      {
          private readonly ILocalizationTextManager _textManager;
          private readonly ICurrentTenant _currentTenant;
    
          public MyDataSeedContributor(ILocalizationTextManager textManager, ICurrentTenant currentTenant)
          {
              _textManager = textManager;
              _currentTenant = currentTenant;
          }
    
          public async Task SeedAsync(DataSeedContext context)
          {
              using (_currentTenant.Change(context?.TenantId))
              {
                  // Portuguese example
                  await _textManager.SetAsync("LeptonX", "FilterMenu", "pt-BR", "Filtrar menu");
    
                  // Add other languages as needed
                  await _textManager.SetAsync("LeptonX", "FilterMenu", "en", "Filter menu");
              }
          }
      }
    
    • Run the DbMigrator or your seeder so the values are stored. Reload the Angular app.
    • Make sure Angular requests dynamic localizations
      • ABP Angular already loads dynamic text via application-localization API. If you disabled it, re-enable by keeping OnlyDynamics=True in the initial calls (default). No extra Angular change is needed.
    • If you are not seeing changes:
      • Clear the browser cache and hard refresh.
      • Ensure the active culture matches the translated language (check the language selector or SessionStateService language).
      • Confirm the Resource name is exactly LeptonX and the Key is exactly FilterMenu (case-sensitive).
      • Verify you didn’t override the component template with a hardcoded string.
    1. Sources
    • Validated link:
      • https://abp.io/docs/latest/ui/angular/localization

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    dcsimoes created

    The text already exists on localization

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    What is the page URL? Is it an Angular or an MVC page?

    Thanks.

  • User Avatar
    0
    dcsimoes created

    It is on angular and is page agnostic, it's on the sidebar layout

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We will fix it in the next patch version.

    You can override the MenuFilterComponent to replace it.

    Thanks.

  • User Avatar
    0
    dcsimoes created

    Can you exemplify?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Override the MenuFilterComponent component and change the menuFilterText to FilterMenu.

    https://abp.io/docs/latest/framework/ui/angular/component-replacement#how-to-replace-a-component

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.1.0-preview. Updated on November 04, 2025, 06:41