PHP Classes

Cyrillic to Latin Transliteration: Transliterate Cyrillic text to Latin characters

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 556 All time: 5,476 This week: 97Up
Version License PHP version Categories
cyrillic-translitera 1.0Artistic License4.0Localization, PHP 5, Text processing
Description 

Author

This package is specific mainly for applications used in Bulgaria Bulgaria .

This class can transliterate Cyrillic text to Latin characters.

It can take a text string with Cyrillic characters and convert those characters to most similar characters in the Latin alphabet.

The input text and output text encodings are configurable.

Picture of Filip Filipov
Name: Filip Filipov <contact>
Classes: 1 package by
Country: Bulgaria Bulgaria

Details

Cyrillic to Latin Transliteration DESCRIPTION =========== Transliteration of Cyrillic to Latin (GOST 7.79 B). Can be used for Bulgarian or/and Russian transliteration. Usefull for creating friendly urls (like blog post title or url). Important!!! Is case insensitive. LICENSE ======= "Cyrillic to Latin Transliteration" is released under the GNU General Public License. To read the license please visit http://www.gnu.org/licenses/gpl.html REQUIREMENTS ============ PHP4 or later HOW TO USE ========== You can set transliteration for Russian or Bulgarian. You can set encoding of the input string and encoding of the output string in result. (see the example.php) <?php // Include class file include('translit.class.php'); $translit = new Transliteration(); // Not not necessarily ('bg' for Bulgarian, 'ru' for Russian). Default transliteration is Bulgarian. $translit->Table = 'bg'; // Set encoding of the input string. Not necessarily. By default is utf-8. $translit->EncodeIn = 'cp1251'; // Set encoding of the output string. Not necessarily. By default is utf-8. $translit->EncodeOut = 'utf-8'; // Sample text $text = 'Това е примерен текст на кирилица.'; // This is sample text in cyrillic. // Send text to transliteration $string = $translit->Translit($text); // Print transliterated text echo $string; ?> CONTACT ======= Filip Filipov E-Mail: primecode@gmail.com Website: htp://www.xamex.com/

  Files folder image Files (3)  
File Role Description
Plain text file example.php Example Example
Plain text file readme.txt Doc. README
Plain text file translit.class.php Class Class File

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:556
This week:0
All time:5,476
This week:97Up