Download the PHP package pointergr/greek-to-greeklish without Composer
On this page you can find all versions of the php package pointergr/greek-to-greeklish. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pointergr/greek-to-greeklish
More information about pointergr/greek-to-greeklish
Files in pointergr/greek-to-greeklish
Package greek-to-greeklish
Short Description A PHP library for converting Greek text to Greeklish (Greek words written with Latin characters)
License MIT
Informations about the package greek-to-greeklish
Greek To Greeklish Converter
A PHP library for converting Greek text to Greeklish (Greek words written with Latin characters).
Features
- Converts Greek text to Greeklish maintaining proper case (uppercase/lowercase)
- Handles special Greek diphthongs (αυ, ευ, μπ, etc.)
- Preserves non-Greek characters in the text
- Supports all Greek characters and accents
- Produces readable and linguistically appropriate transliterations
Installation
Install the package via composer:
Usage
Basic Usage
Examples
Testing Functionality
The library includes a comprehensive test suite to verify correct transliteration:
Testing
The package comes with PHPUnit tests to ensure the conversion is working correctly:
You can also run the tests directly with PHPUnit:
Transliteration Rules
The converter follows specific rules for transliterating Greek to Latin characters:
-
Simple character mapping:
- α → a, β → v, γ → g, δ → d, etc.
-
Diphthongs:
- αι, αί → ai
- ει, εί → ei
- οι, οί → oi
- ου, ού → ou
- ντ → nt
- μπ → mp (within word) or b (at beginning)
- γγ → ng
- γκ → gk
-
Context-sensitive substitutions:
- αυ, ευ before vowels → av, ev
- αυ, ευ before consonants → af, ef
- μπ depending on position → mp or b
- Special cases for beginning of words:
- θ → th (with proper capitalization)
- χ → ch (with proper capitalization)
- ψ → ps (with proper capitalization)
Requirements
- PHP 7.0 or higher
- mbstring PHP extension
License
This package is open-sourced software licensed under the MIT license.
All versions of greek-to-greeklish with dependencies
ext-mbstring Version *