Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turanjanin/serbian-transliterator
PHP library for transliteration between Serbian Cyrillic and Latin scripts
https://github.com/turanjanin/serbian-transliterator
cyrillic latin-alphabet serbian-language transliteration transliterator
Last synced: about 2 months ago
JSON representation
PHP library for transliteration between Serbian Cyrillic and Latin scripts
- Host: GitHub
- URL: https://github.com/turanjanin/serbian-transliterator
- Owner: turanjanin
- License: mit
- Created: 2021-03-31T20:59:02.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-27T23:01:12.000Z (almost 3 years ago)
- Last Synced: 2024-10-24T21:59:26.472Z (2 months ago)
- Topics: cyrillic, latin-alphabet, serbian-language, transliteration, transliterator
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Serbian Transliterator - PHP library
This library converts text between Serbian Latin and Cyrillic scripts.
It comes with an extensive list of exceptions in order to properly handle digraphs when transliterating
from Latin to Cyrillic (*injekcija* becomes *инјекција* instead of *ињекција*).Additionally, the most common foreign words will be detected and left in their original form (*Facebook* won't be transliterated to *Фацебоок*).
## Installation
You can install the package via composer:
```bash
composer require turanjanin/serbian-transliterator
```## Usage
```php
use Turanjanin\SerbianTransliterator\Transliterator;echo Transliterator::toLatin('Брза вижљаста лија хоће да ђипи преко лењог флегматичног џукца.');
// Brza vižljasta lija hoće da đipi preko lenjog flegmatičnog džukca.echo Transliterator::toAsciiLatin('Fijuče vetar u šiblju, ledi pasaže i kuće iza njih i gunđa u odžacima.');
// Fijuce vetar u siblju, ledi pasaze i kuce iza njih i gundja u odzacima.echo Transliterator::toCyrillic('Odjednom Tanjug reče da će nadživeti injekciju. Dodjavola, džangrizava njuška je bila u pravu.');
// Одједном Танјуг рече да ће надживети инјекцију. Дођавола, џангризава њушка је била у праву.
```## Author
- [Jovan Turanjanin](https://github.com/turanjanin)
The list of exceptions for transliteration is taken from [turanjanin/cirilizator](https://github.com/turanjanin/cirilizator) project.
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.