Skip to content

essentialkaos/translit

GoReportCard Code Climate Maintainability Codacy badge
GitHub Actions CI Status GitHub Actions CodeQL Status Coverage Status

CI StatusUsage ExampleLicense


translit is a package for Go 1.22+ for transliteration of Russian text.

Supported output formats:

  • Scientific
  • ISO 9:1995/A ГОСТ 7.79-2000/A
  • ISO 9:1995/B ГОСТ 7.79-2000/Б
  • BGN/PCGN
  • ALA-LC
  • BS 2979:1958
  • ICAO (ИКАО)
package main

import (
  "fmt"
  "strings"

  "github.com/essentialkaos/translit/v3"
)

func main() {
  firstName := "Владислав"
  lastName := "Чернявенький"

  transliterator := translit.ICAO

  tFistName := transliterator(strings.ToLower(firstName))[:1]
  tLastName := transliterator(strings.ToLower(lastName))

  fmt.Printf("%s %s → %s.%s\n", firstName, lastName, tFistName, tLastName)
}

CI Status

Branch Status
master CI
develop CI

License

Apache License, Version 2.0