Skip to content

Implement Localization #162

@ilhesam

Description

@ilhesam

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();
});

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions