Skip to content

fre5h/transliteration-go

Repository files navigation

Transliteration

GO library for transliteration. 🇺🇦 🇬🇧 🔡

Build Status CodeCov Go Report Card License Gitter GoDoc

Demo ⚙️

You can test it with my Transliteration Telegram Bot.

Requirements 🧐

  • GO >= 1.20

Available transliteration methods 🎁

From To Rules
Ukrainian Latin Resolution of the Cabinet of Ministers of Ukraine №55 dated January 27, 2010
https://zakon.rada.gov.ua/laws/show/55-2010-%D0%BF#Text

Using 👨‍🎓

main.go
package main

import (
    "fmt"
    "os"
    "strings"

    "github.com/fre5h/transliteration-go"
)

func main() {
    inputString := strings.Join(os.Args[1:], " ")
    transliteratedString := transliteration.UkrToLat(inputString)

    fmt.Println("transliterated text: ", transliteratedString)
}
bash
$ go get "github.com/fre5h/transliteration-go"@v1.2.0
go: downloading github.com/fre5h/transliteration-go v1.2.0
go: added github.com/fre5h/transliteration-go v1.2.0

$ go run main.go Слава Україні!
transliterated text: Slava Ukraini!

Some examples of Ukrainian-to-Latin transliteration ℹ️

Ukrainian text Transliterated text
Володимир Volodymyr
Богдан Bohdan
Жанна Zhanna
Наталія Nataliia
Олексій Oleksii
Уляна Uliana
Юрій Yurii

Contributing 🤝

See CONTRIBUTING file.