Persian (Iran) (fa_IR) locale for Faker PHP.
composer require --dev xefi/faker-php-locales-fa-irThe service provider is discovered automatically through Composer.
use Xefi\Faker\Faker;
$faker = new Faker('fa_IR');Generators without a fa_IR variant fall back to the default locale.
- 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.
- 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.
MIT