Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/essentialkaos/translit

Go package for Russian text transliteration
https://github.com/essentialkaos/translit

golang golang-package transliteration

Last synced: 15 days ago
JSON representation

Go package for Russian text transliteration

Awesome Lists containing this project

README

        



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+](https://github.com/essentialkaos/.github/blob/master/GO-VERSION-SUPPORT.md) 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](https://go.dev/play/p/PiuGUfXiM9y)

```go
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](https://kaos.sh/w/translit/ci.svg?branch=master)](https://kaos.sh/w/translit/ci?query=branch:master) |
| `develop` | [![CI](https://kaos.sh/w/translit/ci.svg?branch=develop)](https://kaos.sh/w/translit/ci?query=branch:develop) |

### License

[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)