-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
What do we want in this phase?
- Storing translations in the MongoDB and JSON repositories (CRUD)
- Customize
IStringLocalizerand retrieving data from memory cache
uBeac.Core.Localization.Abstractions
We will have an entity:
public class LocalizationValue : Entity
{
public string Key { get; set; } // "welcome-message"
public string Value { get; set; } // "Welcome to uBeac!"
public string CultureName { get; set; } // "en-US"
}Also the following interfaces:
public interface ILocalizationRepository : IService
{
// CRUD methods
}
public interface ILocalizationService : IService
{
// CRUD methods
}
public interface ILocalizationCachingService : IService
{
// Storing and retrieving data
}We should implement these interfaces in the another packages:
uBeac.Core.Localization.Repositories.MongoDBuBeac.Core.Localization.Repositories.JSONuBeac.Core.Localization
Registration
services.AddCustomLocalization(localization =>
{
localization.UseJsonFiles();
localization.UseInMemoryCaching();
});