Turkish.php
Turkish Suffix Library for PHP - Türkçe Çekim ve Yapım Ekleri
Install / Use
/learn @yasinkuyu/Turkish.phpREADME
Turkish.php
Turkish Suffix Library for PHP
Composer Install
composer require yasinkuyu/turkish
require_once __DIR__ . '/vendor/autoload.php';
Manual installation
require 'Turkish.php';
Using
$tr = new Turkish;
echo $tr->makeGenitive("Öykü", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeDative("Fatma", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeDative("Yasin", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeDative("ALİ", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeAblative("Ali", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeAccusative("Kaliningrad", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeDerivative("güneş", array ( "proper_noun" => false ) ), PHP_EOL;
echo $tr->makeGenitive("ağaç", array ( "proper_noun" => false ) ), PHP_EOL;
echo $tr->makeAccusative("erik", array ( "proper_noun" => false ) ), PHP_EOL;
echo $tr->makeAccusative("Erik", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->possessiveAffix("kavanoz", array ( "person" => "1", "quantity" => "singular" ) ), PHP_EOL;
echo $tr->possessiveAffix("kavanoz", array ( "person" => "2", "quantity" => "singular") ), PHP_EOL;
echo $tr->possessiveAffix("kavanoz", array ( "person" => "3", "quantity" => "singular") ), PHP_EOL;
echo $tr->possessiveAffix("halter", array ( "person" => "1", "quantity" => "plural") ), PHP_EOL;
echo $tr->possessiveAffix("halter", array ( "person" => "2", "quantity" => "plural") ), PHP_EOL;
echo $tr->possessiveAffix("halter", array ( "person" => "3", "quantity" => "plural") ), PHP_EOL;
echo $tr->possessiveAffix("Kenya", array ( "person" => "3", "quantity" => "plural") ), PHP_EOL;
Output
Öykü'nün
Fatma'ya
Yasin'e
ALİ'YE
Ali'den
Kaliningrad'ı
güneşli
ağacın
eriği
Erik'i
kavanozum
kavanozun
kavanozu
halterimiz
halteriniz
halterleri
Kenyaları
Turkish Grammar
- Turkish is a highly agglutinative language, i.e., Turkish words have many grammatical suffixes or endings that determine meaning. Turkish vowels undergo vowel harmony. When a suffix is attached to a stem, the vowel in the suffix agrees in frontness or backness and in roundedness with the last vowel in the stem. Turkish has no gender.
- More Info
Author
-
Yasin Kuyu
-
C# Version https://github.com/yasinkuyu/Turkish.cs
JavaScript Version https://github.com/yasinkuyu/Turkish.js
Python Version https://github.com/miklagard/Turkish-Suffix-Library
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
