xefi / faker-php-locales-tr-tr
Faker extension to include tr_TR locale
v1.0.1
2026-11-18 10:21 UTC
Requires
- php: ^8.3
- ext-mbstring: *
- psr/container: ^2.0
- xefi/faker-php: ^1.5.3
Requires (Dev)
- phpunit/phpunit: ^11
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Turkish (tr_TR) locale for Faker PHP.
Installation
composer require --dev xefi/faker-php-locales-tr-tr
The service provider is discovered automatically through Composer.
Usage
use Xefi\Faker\Faker; $faker = new Faker('tr_TR');
Generators without a tr_TR variant fall back to the default locale.
What's included
- Names:
name(),firstName(),lastName(),title(). - Personal identifier:
tcKimlikNo()(T.C. Kimlik No, 11 digits, two check digits). - Company identifier:
vkn()(Vergi Kimlik Numarası, 10 digits with check digit). - Addresses:
province()(81 iller),provinceCode()(plate code 01–81),city(), 5-digitpostcode()starting with the plate code,streetName(),streetAddress()andfullAddress(). - Phone numbers with the
0trunk prefix or the+90indicator. iban():TRIBAN with a valid checksum.- Colours and text in Turkish;
words()follows the Turkish dotted / dotless i lowercase rules.
Contributing
- Fork the repository and create a branch from
main. - Add an extension under
src/Extensions/and register it inFakerTrTrServiceProvider::boot(). - Add a test under
tests/Unit/. - Run the suite with
vendor/bin/phpunit(ordocker compose run php vendor/bin/phpunit). - Open a pull request against
main.
License
MIT