What do we want in this phase?
- Storing translations in the MongoDB and JSON repositories (CRUD)
- Customize
IStringLocalizer and 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.MongoDB
uBeac.Core.Localization.Repositories.JSON
uBeac.Core.Localization
Registration
services.AddCustomLocalization(localization =>
{
localization.UseJsonFiles();
localization.UseInMemoryCaching();
});
What do we want in this phase?
IStringLocalizerand retrieving data from memory cacheuBeac.Core.Localization.AbstractionsWe will have an entity:
Also the following interfaces:
We should implement these interfaces in the another packages:
uBeac.Core.Localization.Repositories.MongoDBuBeac.Core.Localization.Repositories.JSONuBeac.Core.LocalizationRegistration