branch icon

Impelement External Localization in the Language Management Module #11695

What's Done

Basically implemented the necessary changes for https://github.com/abpframework/abp/pull/13845

  • Implemented ExternalLocalizationStore that gets localization resources from database. Introduced ExternalLocalizationResourceContributor that resource fills texts from database. ExternalLocalizationTextCache is very optimized (it has in-memory cache and distributed cache layers before database operations)
  • Introduced LocalizationResourceRecord and LocalizationTextRecord aggregate roots to store resources and texts in the database. Database table/collection names are AbpLocalizationResources and AbpLocalizationTexts.
  • Added sorting to language and language text application services (previously, some data was not properly sorted).
  • Created ExternalLocalizationSaver that automatically saves all localization resources and texts into the database, so other services (in a distributed system) can read them.
  • Introduced AbpExternalLocalizationOptions with SaveToExternalStore property to disable saving localization resources to database. It can be disabled for monolith applications. I don't want to make it disabled by default, because it has no big performance cost (well optimized and runs in a separate thread), but enabling it for all microservices can be forgotten.

Breaking Changes

  • LanguageTextConsts.MaxValueLength is changed from 64 megabytes to 64 kilobytes. Old value was unnecessary big. I don't know why I've done it like that before.
  • Added new entities, so EF Core applications should add a database migration.