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. IntroducedExternalLocalizationResourceContributor
that resource fills texts from database.ExternalLocalizationTextCache
is very optimized (it has in-memory cache and distributed cache layers before database operations) - Introduced
LocalizationResourceRecord
andLocalizationTextRecord
aggregate roots to store resources and texts in the database. Database table/collection names areAbpLocalizationResources
andAbpLocalizationTexts
. - 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
withSaveToExternalStore
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.