CaseTunisia.Tools.L10n 1.0.0

L10n

Localization or regionalization is a process consisting of adapting a product or content so that it can meet the cultural and linguistic requirements of a targeted market. The localization is sometimes abbreviated as l10n, where the number 10 equals the number of characters between the letters l and n in the word. Often wrongly compared to a simple translation. This project is to get the location language and how to Create a new ressources file that can be usefull to diffrent culture.

Usage

You have to add the job as a singleton

     services.Configure<ResourceConfiguration>(Configuration.GetSection(nameof(ResourceConfiguration)));
     services.AddSingleton<ResourceService>();

You have To add this configuration in appsettings.json file

    "ResourceConfiguration": {
    "CultureName": "",
    "FolderPath": "Resources",
    "ResourceFileName": "ApplicationResource"
  },

Create a new folder named Resources like in the configuration and add your Resources file: the name must be started with "ApplicationResources" (as in config) . "CultureInfo" . "L10n" Exemples:

ApplicationResource.de-DE.L10n

ApplicationResource.en-US.L10n

After that you have to rich your resources files

{
  "txt_Exemple": "Exemple",
}

Then you need to inject the service in the page where u will use it or in shared page

@inject L10n.ResourceService service

Finally you can simply use the service

@service["txt_Exemple"]

No packages depend on CaseTunisia.Tools.L10n.

location; resources

.NET Standard 2.0

Version Downloads Last updated
1.0.0 393 11/13/2023