Open Closed

Switch localization source from json to DB driven #5388


User avatar
0
bma.ffm.dev@sjrb.ca created
  • ABP Framework version: v7.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: n/a
  • Steps to reproduce the issue:" n/a

Currently, our angular FE loads localization strings from json files, served by our auth service, one file per locale. How can we switch our localization provider from json to DB (PostgreSQL) so we can manage localization strings through ABP built-in localization UI under Administration/Language management/Language Text?

Thank you


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

    hi

    Currently, our angular FE loads localization strings from json files, served by our auth service, one file per locale.

    Please explain this in detail. Im not understand it very well.

    https://docs.abp.io/en/commercial/latest/modules/language-management

  • User Avatar
    0
    bma.ffm.dev@sjrb.ca created

    Basically, we were following an example from https://docs.abp.io/en/commercial/7.2/startup-templates%2Fmicroservice%2Finfrastructure e.g. Configure<AbpLocalizationOptions>(options => { options.Resources .Add<MyProjectNameResource>("en") .AddBaseTypes( typeof(AbpValidationResource) ).AddVirtualJson("/Localization/MyProjectName");

    options.DefaultResourceType = typeof(MyProjectNameResource);
    

    });

    that is how we load localization from json files, ideally, we would like to repoint it to load from DB

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The microservices project is already built in the LanguageManagement module. You can check the localization text on the language texts page.

    https://docs.abp.io/en/commercial/latest/modules/language-management#language-texts

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35