translit

package module
v2.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 1 Imported by: 11

README

PkgGoDev GoReportCard Code Climate Maintainability Codebeat badge
GitHub Actions CI Status GitHub Actions CodeQL Status Coverage Status

InstallationBuild StatusLicense


translit is a Go package for Russian text transliteration.

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

Installation

Make sure you have a working Go 1.18+ workspace (instructions), then:

go get -u github.com/essentialkaos/translit/v2

Build Status

Branch Status
master CI
develop CI

License

Apache License, Version 2.0

Documentation

Overview

Package translit convert russian text to translit

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ALALC added in v2.1.0

func ALALC(text string) string

ALALC encodes text with ALA-LC mappings

Example
fmt.Println(ALALC(source))
Output:

Shirokai͡a ėlektrifikat͡sii͡a i͡uzhnykh guberniĭ dast moshchnyĭ tolchok pod″ëmu sel′skogo khozi͡aĭstva.

func BGN added in v2.1.0

func BGN(text string) string

BGN encodes text with BGN mappings

Example
fmt.Println(BGN(source))
Output:

Shirokaya elektrifikatsiya yuzhnykh guberniy dast moshchnyy tolchok pod″ëmu sel′skogo khozyaystva.

func BS added in v2.1.0

func BS(text string) string

BS encodes text with BS 2979:1958 mappings

Example
fmt.Println(BS(source))
Output:

Shirokaya élektrifikatsiya yuzhnȳkh guberniĭ dast moshchnȳĭ tolchok pod″ëmu sel′skogo khozyaĭstva.

func EncodeToALALC deprecated

func EncodeToALALC(text string) string

EncodeToALALC encodes text with ALA-LC mappings

Deprecated: Use ALALC method instead

func EncodeToBGN deprecated

func EncodeToBGN(text string) string

EncodeToBGN encodes text with BGN mappings

Deprecated: Use BGN method instead

func EncodeToBS deprecated

func EncodeToBS(text string) string

EncodeToBS encodes text with BS 2979:1958 mappings

Deprecated: Use BS method instead

func EncodeToICAO deprecated

func EncodeToICAO(text string) string

EncodeToBS encodes text with ICAO mappings

Deprecated: Use ICAO method instead

func EncodeToISO9A deprecated

func EncodeToISO9A(text string) string

EncodeToISO9A encodes text with ISO 9:1995/A ГОСТ 7.79-2000/A mappings

Deprecated: Use ISO9A method instead

func EncodeToISO9B deprecated

func EncodeToISO9B(text string) string

EncodeToISO9B encodes text with ISO 9:1995/B ГОСТ 7.79-2000/Б mappings

Deprecated: Use ISO9B method instead

func EncodeToPCGN deprecated

func EncodeToPCGN(text string) string

EncodeToPCGN encodes text with PCGN mappings

Deprecated: Use PCGN method instead

func EncodeToScientific deprecated

func EncodeToScientific(text string) string

EncodeToScientific encodes text with scientific mappings

Deprecated: Use Scientific method instead

func ICAO added in v2.1.0

func ICAO(text string) string

ICAO encodes text with ICAO mappings

Example
fmt.Println(ICAO(source))
Output:

Shirokaia elektrifikatsiia iuzhnykh gubernii dast moshchnyi tolchok podieemu selskogo khoziaistva.

func ISO9A added in v2.1.0

func ISO9A(text string) string

ISO9A encodes text with ISO 9:1995/A ГОСТ 7.79-2000/A mappings

Example
fmt.Println(ISO9A(source))
Output:

Širokaâ èlektrifikaciâ ûžnyh gubernij dast moŝnyj tolčok pod″ëmu sel′skogo hozâjstva.

func ISO9B added in v2.1.0

func ISO9B(text string) string

ISO9B encodes text with ISO 9:1995/B ГОСТ 7.79-2000/Б mappings

Example
fmt.Println(ISO9B(source))
Output:

Shirokaya e`lektrifikaсiya yuzhny`x gubernij dast moshhny`j tolchok pod``yomu sel`skogo xozyajstva.

func PCGN added in v2.1.0

func PCGN(text string) string

PCGN encodes text with PCGN mappings

Example
fmt.Println(PCGN(source))
Output:

Shirokaya elektrifikatsiya yuzhnykh guberniy dast moshchnyy tolchok pod″ëmu sel′skogo khozyaystva.

func Scientific added in v2.1.0

func Scientific(text string) string

Scientific encodes text with scientific mappings

Example
fmt.Println(Scientific(source))
Output:

Širokaja èlektrifikacija južnych gubernij dast moščnyj tolčok pod″ëmu sel′skogo chozjajstva.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL