xefi / faker-php-locales-fa-ir
Faker extension to include fa_IR locale
v1.0.1
2026-11-18 10:21 UTC
Requires
- php: ^8.3
- psr/container: ^2.0
- xefi/faker-php: ^1.5.3
Requires (Dev)
- phpunit/phpunit: ^11
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Persian (Iran) (fa_IR) locale for Faker PHP.
Installation
composer require --dev xefi/faker-php-locales-fa-ir
The service provider is discovered automatically through Composer.
Usage
use Xefi\Faker\Faker; $faker = new Faker('fa_IR');
Generators without a fa_IR variant fall back to the default locale.
What's included
- Names in Persian script:
name(),firstName(),lastName(),title(). - Personal identifier:
codeMelli()(کد ملی, 10 digits with check digit). - Company identifier:
shenaseMelli()(شناسه ملی, 11 digits with check digit). - Addresses:
province()(31 ostans),city(), 10-digitpostcode(),streetName(),streetAddress()andfullAddress(). - Phone numbers with the
0trunk prefix or the+98indicator. iban():IRIBAN (شبا) with a valid checksum.- Colours and text in Persian. Generated identifiers, postcodes and numbers use ASCII digits.
Contributing
- Fork the repository and create a branch from
main. - Add an extension under
src/Extensions/and register it inFakerFaIrServiceProvider::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