Open Closed

Custom localizations are not returned by the application-localization endpoint after upgrade to ABP 10.4.1 #10745


User avatar
0
mattw@agilenova.com created

Hello,

I am trying to upgrade from ABP 9.3.7 to ABP 10.4.1 and have encountered a localization issue - I am only seeing localization keys in the angular front-end and the application-localization endpoint is not returning my applications custom localization values in the relevant section: "MyApplication": { "texts": {}, "baseResources": [ "AbpValidation", "AbpUi" ] },.

I have not modified the embedded localization resources (en.json, etc.), the MyApplicationResource class, or the localization configuration in MyApplicationDomainSharedModule. I have verified that the en.json file is an Embedded Resource with Do Not Copy.

Do I need to modify the localization configuration as part of this migration? Why is this happening?

Thank you, Matt

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

4 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • This happens when your embedded JSON localization files are no longer being served by the Virtual File System (VFS) after the upgrade, so the /api/abp/application-localization endpoint can only return the resource metadata (resource name + baseResources), but cannot read your embedded en.json, therefore:

      • Angular shows localization keys (because texts aren’t available),
      • and the endpoint returns "texts": {} for your resource.
    • In ABP v10, a common cause (especially after upgrades) is that the project that contains your embedded localization JSONs (typically *.Domain.Shared) does not reference Microsoft.Extensions.FileProviders.Embedded anymore (or it wasn’t present). Without it, embedded files may not be discoverable by VFS at runtime in some setups.

    • Fix: add the embedded file provider package to the project that contains the embedded json files (usually MyApplication.Domain.Shared.csproj):

    <ItemGroup>
        <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="*" />
      </ItemGroup>
    

    Then rebuild and rerun. After that, /api/abp/application-localization should start returning your "MyApplication": { "texts": { ... } } content again.

    • You do not need to change your localization configuration (e.g. AddVirtualJson("/Localization/MyApplication")) if it was already correct and unchanged; this is typically a missing runtime dependency needed to read embedded resources.

    • If you also have module/submodule resources, apply the same fix to each *.Domain.Shared (or whichever assembly embeds the localization jsons).

    Links (verified):

    • https://abp.io/support/questions/9788
    • https://docs.abp.io/en/abp/latest/Virtual-File-System#working-with-the-embedded-files
    • https://docs.abp.io/en/abp/latest/Localization#extending-existing-resource

    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.

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

    Hi,

    To narrow this down, could you share a few things:

    1. Your MyApplication.Domain.Shared.csproj (full file).
    2. Your MyApplicationDomainSharedModule.cs — specifically the ConfigureServices method.
    3. The full JSON response from /api/abp/application-localization?cultureName=en — we'd like to see whether other resources (like AbpIdentity, AbpUi, etc.) also have empty texts, or only your MyApplication resource.

    In the meantime, you can try this. Your symptom usually comes from Microsoft.Extensions.FileProviders.Embedded being missing or pruned in Domain.Shared after upgrading across .NET versions. Without that package, the manifest XML isn't embedded into your Domain.Shared.dll, ABP's virtual file system can't find your en.json, and the endpoint returns texts: {} while the resource itself is still registered (which matches what you're seeing — the resource shows up with the correct baseResources, just no texts).

    Make sure MyApplication.Domain.Shared.csproj has all three pieces below:

    <PropertyGroup>
      <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
    </PropertyGroup>
    
    <ItemGroup>
      <EmbeddedResource Include="Localization\MyApplication\*.json" />
      <Content Remove="Localization\MyApplication\*.json" />
    </ItemGroup>
    
    <ItemGroup>
      <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.7" />
    </ItemGroup>
    

    Then run dotnet clean && dotnet build and restart the host. The MyApplication resource should start returning its texts.

    If all three pieces are already in place, send over the csproj and module file and we'll dig deeper.

    Thanks

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

    Hello,

    The issue was a missing Microsoft.Extensions.FileProviders.Embedded reference.

    Thank you!

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

    Great 👍

    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.