Dakov.Transliterator 1.1.4

dotnet add package Dakov.Transliterator --version 1.1.4                
NuGet\Install-Package Dakov.Transliterator -Version 1.1.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dakov.Transliterator" Version="1.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dakov.Transliterator --version 1.1.4                
#r "nuget: Dakov.Transliterator, 1.1.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dakov.Transliterator as a Cake Addin
#addin nuget:?package=Dakov.Transliterator&version=1.1.4

// Install Dakov.Transliterator as a Cake Tool
#tool nuget:?package=Dakov.Transliterator&version=1.1.4                

Dakov.Transliterator

License NuGet Badge

Both directions transliteration .Net library converting Cyrillic to Latin by the Basic and Bulgarian rule set.

If my small library saved you time and you think that is useful, you can share it with your friends or colleagues.
And if you want, don't hesitate to grab me a beer. 😃

An expression of gratitude

For each person who donates, I can allocate space for his name, project, or other information that he wants to share with my auditory. The data will be in the section Friends and Supporters. This also can be ads exchange. 😃

Donation opportunities

All wallets are provided and supported by Bitfinex. Please read the actual information.

  • Bitcoin (BTC)
    Address - 3FqXqTzGhzxosERosz832F7rGDXMteMjRh

  • Ethereum (ETH) At this time Bitfinex does not accept transactions sent from smart contracts.
    Address - 0x818E07acD7d75d1812B2E7067e417C5Bc80d327E

  • XRP (XRP) Sending XRP requires both an address and a Tag
    Address - rLW9gnQo7BQhU6igk5keqYnH3TVrCxGRzm
    Tag - 2345006832

  • Dogecoin (DOGE)
    Address - DNXrvtmrSWVyBKfmPizXQsreqLSRJQpqCv

  • Bitcoin Cash Node (BCHN) Depositing anything other than BCH Node WILL RESULT IN LOSS OF FUNDS. Bitfinex currently is not supporting automated chain splits.
    Address - bitcoincash:qz4tu69cn50gryhdahemytrszdtnn9vwtqexclhleq

  • Litecoin (LTC)
    Address - MD7ngCjhUbLNZfnvLdXkVu1LUkXwZMTHmF

  • Monero (XMR)
    Address - 86GNkvtYzbEZwq5MxpVvzP7kZ2tUgea5SKy8FTJ4S48fY8hz3DYBPWwJsLNz2woi7dQi34TYkcPDpZKh7iZLaaMLGHrSTwZ

Note: It is recommended that you check the transaction fees before making a transaction and then select the appropriate currency. Sometimes the fees are extremely high.

Installation

Its can be installed and use via NuGet:

Package Manager
Install-Package Dakov.Transliterator
.NET CLI
dotnet add package Dakov.Transliterator

How to use it

We should include the library after the installation.

using Dakov.Transliterator;

Code snippets show how to call the methods.

var cyrillicText = "Съученичките Мария и Дияна скачаха с бънджи.";

var options1 = new TransliterationOption
{
    TransliterationRuleset = TransliterationRuleset.Basic,
    UrlCompatibility = false,
    WordSeparator = '-',
};

// If we miss the TransliterationOption param we will use the default values.
// We can see it in the example above "option1".
var latinText0 = Transliterator.CyrillicToLatin(cyrillicText);
// The result is : Sauchenichkite Mariya i Diyana skachaha s bandzhi.

var latinText1 = Transliterator.CyrillicToLatin(cyrillicText, options1);
// The result is : Sauchenichkite Mariya i Diyana skachaha s bandzhi.

var options2 = new TransliterationOption
{
    TransliterationRuleset = TransliterationRuleset.Bulgarian,
};

var latinText2 = Transliterator.CyrillicToLatin(cyrillicText, options2);
// The result is : Sauchenichkite Maria i Diyana skachaha s bandzhi.
// One of the differences between the Basic and Bulgarian rule set you can see in the name "Мария".
// According to the Article 5(2) of the Transliteration Law.

var options3 = new TransliterationOption
{
    TransliterationRuleset = TransliterationRuleset.Bulgarian,
    UrlCompatibility = true,
};

var latinText3 = Transliterator.CyrillicToLatin(cyrillicText, options3);
// The result is : sauchenichkite-maria-i-diyana-skachaha-s-bandzhi

var options4 = new TransliterationOption
{
    TransliterationRuleset = TransliterationRuleset.Bulgarian,
    UrlCompatibility = true,
    WordSeparator = '_',
};

var latinText4 = Transliterator.CyrillicToLatin(cyrillicText, options4);
// The result is : sauchenichkite_maria_i_diyana_skachaha_s_bandzhi

var listOfCyrillicTexts = new List<string>()
{
    "Съученичките Мария и Дияна скачаха с бънджи.",
    "Полета от високо е опасен и вдига адреналина.",
    "На следващият ден двете момичета разказаха на приятелите си."
};

var listOfCyrillicTexts0 = Transliterator.CyrillicToLatin(listOfCyrillicTexts);
// The result is :
// - Sauchenichkite Mariya i Diyana skachaha s bandzhi.
// - Poleta ot visoko e opasen i vdiga adrenalina.
// - Na sledvashtiyat den dvete momicheta razkazaha na priyatelite si.

var listOfCyrillicTexts1 = Transliterator.CyrillicToLatin(listOfCyrillicTexts, options1);
// The result is :
// - Sauchenichkite Mariya i Diyana skachaha s bandzhi.
// - Poleta ot visoko e opasen i vdiga adrenalina.
// - Na sledvashtiyat den dvete momicheta razkazaha na priyatelite si.

// The similar description is valid and for the methods LatinToCyrillic

var latinText = "Sauchenichkite Mariya i Diyana skachaha s bandzhi.";
var cyrillicText = Transliterator.LatinToCyrillic(latinText);
// The result is : Саученичките Мария и Дияна скачаха с банджи.
// But in transliteration via Basic ruleset from Latin to Cyrillic have small percentage inaccuracies.

Transliteration law

The full text on Transliteration Law you can read here (on Bulgarian).

Basic character pairs
Cyrillic Latin
А, а A, a
Б, б B, b
В, в V, v
Г, г G, g
Д, д D, d
Е, е E, e
Ж, ж Zh, zh
З, з Z, z
И, и I, i
Й, й Y, y
К, к K, k
Л, л L, l
М, м M, m
Н, н N, n
О, о O, o
П, п P, p
Р, р R, r
С, с S, s
Т, т T, t
У, у U, u
Ф, ф F, f
Х, х H, h
Ц, ц Ts, ts
Ч, ч Ch, ch
Ш, ш Sh, sh
Щ, щ Sht, sht
Ъ, ъ A, a
Ь, ь Y, y
Ю, ю Yu, yu
Я, я Ya, ya
Bulgarian specific rules and exceptions
Cyrillic Latin Description
ия ia Article 5(2): In case these two letters are at the end of the word.
България Bulgaria Article 6
Стара планина Stara planina Article 7(1)
Атанасовско езеро Atanasovsko ezero Article 7(1)
Нос Емине Cape Emine Article 7(2)
Централен Балкан Tsentralen Balkan Article 7(3)
София-юг Sofia-yug Article 7(3)
Перник-север Pernik-sever Article 7(3)
Златни пясъци Zlatni рyasatsi Article 8
Горна Оряховица Gorna Oryahovitsa Article 8

Friends and Supporters

Waiting for the first friends! 😃

To-Do List

  • Acception generic objects as parameters in transliteration methods.
  • Extending exception support.
  • Adding specific rules for other languages.

Author

Petar Dakov

License

License

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.4 3,804 6/23/2023
1.1.3 66,618 2/25/2020

- Minor changes on top of v1.1.3
     - Implemented new unit tests that guarantee to support .NetCore3.1, .Net5, .Net6 and .Net7
     - These tests will be uploaded to the public repository related to the library