Skip to content

omerfarukz/Core.Localization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localization library for dotnet core

Localization library for dotnet core. Supports xml, json and any other types like Dictionary<string, string>.

Setup

  var sources = new List<ILocalizationSource> {
      new StringSourceInMemory(),
      new XmlDirectoryLocalizationSource("localizations/others/xml"),
      new XmlLocalizationSource("localizations/main.xml", new CultureInfo("tr-TR")),
      new JsonDirectoryLocalizationSource("localizations/others/json"),
      new JsonLocalizationSource("localizations/main.json", new CultureInfo("en-US"))
  };

Usage

  ILocalizationContext context = new DefaultLocalizationContext(man);
  context.CultureInfo = new CultureInfo(cultureName);
  var localizationResult = context.Localize(name);

About

Localization library for dotnet core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages