Translit icon indicating copy to clipboard operation
Translit copied to clipboard

C# library for cyrillic-latin transliteration (support only slavik languages) by GOST 7.79-2000 (ISO 9).

NickBuhro.Translit

License NuGet Badge Build status Coverage Status

C# library for cyrillic-latin transliteration by ISO 9 (ГОСТ 7.79—2000) on System B (only for slavic languages).

Both direction transliteration is supported:

  • cyrillic to latin
  • latin to cyrillic

It could be specified concrete language from list:

  • Russian
  • Belorussian
  • Ukrainian
  • Bulgarian
  • Makedonian

Installation

It's available over NuGet:


Install-Package NickBuhro.Translit

Usage


// Cyrillic to latin example

var latin = Transliteration.CyrillicToLatin("Предками данная мудрость народная!", Language.Russian);
Console.WriteLine(latin);	// Output: Predkami dannaya mudrost` narodnaya!

// Latin to cyrillic example

var cyrillic = Transliteration.LatinToCyrillic("Predkami dannaya mudrost` narodnaya!", Language.Russian);
Console.WriteLine(cyrillic);	// Output: Предками данная мудрость народная!

Running the tests

Solution includes:

  • NickBuhro.Translit.Tests project defines 1000+ xUnit tests;
  • NickBuhro.Translit.Benchmark allows to analyze library performans and compare different implementations;
  • coverage.bat script allows to analyze code coverage using OpenCover, generate reports and publish results to coveralls.io.

Compatibility

The library uses no references except for System - it has no external dependencies. It is cross compiled to:

  • .NET Framework 2.0 and above
  • .NET Standard 1.3