Open Closed

ABP Suite updates localization only for one language file when multiple localization JSON files exist #10767


User avatar
0
AlessandroLittera created

Hello ABP Team,

I'm using ABP Suite 10.4.1 with an ABP Framework 10.4.1 Blazor Server application.

My project contains multiple localization files for the same resource:

src/Project.Domain.Shared/Localization/Project/ de-DE.json en-GB.json it.json

The resource is configured as follows:

Configure<AbpLocalizationOptions>(options => { options.Resources .Add<ProjectResource>("it") .AddBaseTypes(typeof(AbpValidationResource)) .AddVirtualJson("/Localization/Project");

options.DefaultResourceType = typeof(ProjectResource);

options.Languages.Add(new LanguageInfo("it", "it", "Italian"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "German (Germany)"));

}); Steps to reproduce Create a new entity using ABP Suite. Generate the CRUD. Inspect the localization files. Actual behavior

ABP Suite generates the new localization keys only inside de-DE.json.

For example:

"HybridRegions": "Hybrid Regions", "NewHybridRegion": "New Hybrid Region", "Permission:HybridRegions": "Hybrid Regions", ...

No corresponding keys are generated in:

it.json en-GB.json

As a result, developers must manually copy and translate every new localization entry.

Expected behavior

One of the following behaviors would be expected:

Generate the new keys in all localization JSON files belonging to the resource. Or provide an option to select which language file(s) should be updated. Or document that Suite intentionally updates only one localization file.

Currently, only a single language file is modified, which seems inconsistent for projects using multiple supported cultures.

Additional information ABP Framework: 10.4.1 ABP Suite: 10.4.1 UI: Blazor Server Resource contains: it.json en-GB.json de-DE.json

Is this the intended behavior, or could this be a bug in ABP Suite?

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

1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi,

    Suite writes the generated keys into a single base localization file — that part is intentional, it doesn't fan them out to every culture file. The values it generates are English defaults ("HybridRegions": "Hybrid Regions" etc.), so it only puts them in the base file and leaves the other cultures for your real translations, instead of dropping English text into it.json / de-DE.json.

    The rough edge is the file it chose. Suite looks for en.json first and writes there. Your Localization/Project folder has no en.json, so it falls back to the first *.json it finds in the folder — that's why the keys ended up in de-DE.json. It's not a deliberate pick of German, and it's not even stable across machines, since the file enumeration order depends on the OS/filesystem.

    To make it predictable, add an en.json to Localization/Project:

    {
      "culture": "en",
      "texts": {}
    }
    

    From then on every generation writes the new keys into en.json, and you translate them into it.json, en-GB.json and de-DE.json from there.

    To set expectations: there's no option today to write into all culture files at once, or to choose the target file — the en.json file only controls which file gets the keys, the translations themselves are still manual. We'll also review this fallback so it doesn't depend on the arbitrary file order.

    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 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.