Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivantcholakov/transliterate
A PHP class for transliteration
https://github.com/ivantcholakov/transliterate
php transliteration
Last synced: 3 months ago
JSON representation
A PHP class for transliteration
- Host: GitHub
- URL: https://github.com/ivantcholakov/transliterate
- Owner: ivantcholakov
- License: mit
- Created: 2013-10-03T12:48:29.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-06-16T01:20:25.000Z (over 3 years ago)
- Last Synced: 2024-10-02T08:13:48.999Z (3 months ago)
- Topics: php, transliteration
- Language: PHP
- Size: 10.7 KB
- Stars: 11
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Transliterate.php
=================A PHP class for transliteration
Simple examples:
```php
echo Transliterate::to_ascii('Фёдор Михайлович Достоевский', 'russian');
// Result: Fedor Mihajlovich Dostoevskijecho '
';echo Transliterate::to_ascii('Фьодор Михайлович Достоевски', 'bulgarian');
// Result: Fyodor Mihaylovich Dostoevski
```Example on CodeIgniter framework, making a slug for permalink creation:
```php
$product_name = 'Авторско колие с естествен камък тюркоаз';$product_name_ascii = Transliterate::to_ascii($product_name);
// Result: Avtorsko kolie s estestven kamak tyurkoaz$product_slug = url_title($product_name_ascii, '-', true);
echo $product_slug;
// Result: avtorsko-kolie-s-estestven-kamak-tyurkoaz
```Author: Ivan Tcholakov , 2012-2021
License: The MIT License