项目作者: essentialkaos

项目描述 :
Go package for Russian text transliteration
高级语言: Go
项目地址: git://github.com/essentialkaos/translit.git
创建时间: 2017-05-02T11:48:41Z
项目社区:https://github.com/essentialkaos/translit

开源协议:Apache License 2.0

下载




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 (ИКАО)

Usage example

  1. package main
  2. import (
  3. "fmt"
  4. "strings"
  5. "github.com/essentialkaos/translit/v3"
  6. )
  7. func main() {
  8. firstName := "Владислав"
  9. lastName := "Чернявенький"
  10. transliterator := translit.ICAO
  11. tFistName := transliterator(strings.ToLower(firstName))[:1]
  12. tLastName := transliterator(strings.ToLower(lastName))
  13. fmt.Printf("%s %s → %s.%s\n", firstName, lastName, tFistName, tLastName)
  14. }

CI Status

Branch Status
master CI
develop CI

License

Apache License, Version 2.0