xefi / faker-php-locales-be-by
Faker extension to include be_BY locale
v1.0.0
2026-10-27 15:01 UTC
Requires
- php: ^8.3
- psr/container: ^2.0
- xefi/faker-php: ^1.5.4
Requires (Dev)
- phpunit/phpunit: ^11
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-27 21:16:31 UTC
README
Belarusian locale for xefi/faker-php. All data is in Belarusian (Cyrillic, official orthography).
Installation
composer require --dev xefi/faker-php-locales-be-by
The service provider is discovered automatically through Composer.
Usage
$faker = new Xefi\Faker\Faker('be_BY'); $faker->name(gender: 'F'); // Кацярына Шыманская $faker->fullAddress(); // вул. Янкі Купалы, 28, 220030, Мінск $faker->company(); // ТАА «Мінскбудсэрвіс» $faker->unp(); // 292113015 $faker->iban(); // BY60XEPB01979826101994987820 $faker->colorName(); // Індыга $faker->sentences(1); // Наша кампанія прапаноўвае кліентам якасныя паслугі...
Generators without a be_BY variant fall back to the default locale.
What is included
| Extension | Methods |
|---|---|
| Address | region, city, postcode, houseNumber, streetName, streetAddress, fullAddress |
| Colors | safeColorName, colorName |
| Company | company, unp (payer account number with a valid check digit) |
| Financial | iban (28 characters, BY format) |
| Person | name, firstName, lastName, title |
| Text | words, sentences, paragraphs |
Belarusian surnames often change with gender (Кавалёў, Кавалёва; Жылінскі, Жылінская). name() and lastName() always return the form that matches the gender.
Contributing
- Fork the repository and create a branch from
main. - Add an extension under
src/Extensions/and register it inFakerBeByServiceProvider::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