Search by

xefi / faker-php-locales-cs-cz

martinsoenen

Faker extension to include cs_CZ locale

Package info

github.com/xefi/faker-php-locales-cs-cz

pkg:composer/xefi/faker-php-locales-cs-cz

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-11-18 10:22 UTC

This package is auto-updated.

Last update: 2026-11-18 11:05:04 UTC


README

Czech (cs_CZ) locale for Faker PHP.

Installation

composer require --dev xefi/faker-php-locales-cs-cz

The service provider is discovered automatically through Composer.

Usage

use Xefi\Faker\Faker;

$faker = new Faker('cs_CZ');

Generators without a cs_CZ variant fall back to the default locale.

Extensions

This package provides cs_CZ variants of the address, colors, company, financial, person, phone and text extensions. On top of the standard generators, it adds:

Method Extension Description
rodneCislo(?string $gender = null) Person Birth number (YYMMDD/XXXX), divisible by 11, month + 50 for women
lastName(?string $gender = null) Person Last name in its masculine or feminine form; name() keeps both parts in agreement
ico() Company Company identification number (IČO) with modulo 11 check digit
vat() Company VAT number (DIČ, CZ + IČO)

Contributing

  1. Fork the repository and create a branch from main.
  2. Add an extension under src/Extensions/ and register it in FakerCsCzServiceProvider::boot().
  3. Add a test under tests/Unit/.
  4. Run the suite with vendor/bin/phpunit (or docker compose run php vendor/bin/phpunit).
  5. Open a pull request against main.

License

MIT