Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexey-nobody/translit-dart
Simple Dart package for converting Cyrillic symbols to Translit and back
https://github.com/alexey-nobody/translit-dart
dart dartlang flutter flutter-package flutter-plugin
Last synced: 2 months ago
JSON representation
Simple Dart package for converting Cyrillic symbols to Translit and back
- Host: GitHub
- URL: https://github.com/alexey-nobody/translit-dart
- Owner: alexey-nobody
- License: mit
- Created: 2019-08-23T10:55:42.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T07:29:15.000Z (almost 2 years ago)
- Last Synced: 2024-02-19T08:47:44.672Z (11 months ago)
- Topics: dart, dartlang, flutter, flutter-package, flutter-plugin
- Language: Dart
- Homepage: https://pub.dev/packages/translit
- Size: 34.2 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Translit
Simple dart package for converting Cyrillic symbols to Translit and backReverse transliteration into Cyrillic can not always completely convert the text to the original. Please keep this in mind when using this module in your projects.
---
## Links
- See [CHANGELOG.md](./CHANGELOG.md) for major/breaking updates
- [Example](./example/) with explain all features## Installation
```sh
$ dart pub add translit
``````sh
$ flutter pub add --dev translit
```## Usage
### Convert text to translit
By default, the conversion uses a non-symmetrical algorithm. To use the symmetrical algorithm, set the isSymmetrical parameter to true.
```dart
String text = Translit().toTranslit(source: 'Привет мир');
```Привет мир > Privet mir!
### Convert text from transliterated
```dart
String text = Translit().unTranslit(source: 'Privet mir');
```Privet mir > Привет мир
## Contribute
Please feel free to fork, improve, make pull requests or fill issues.
I'll be glad to fix bugs you encountered or improve the extension.