icanboogie/bind-cldr

Binds CLDR to ICanBoogie

Maintainers

👁 olvlvl

Package info

github.com/ICanBoogie/bind-cldr

Homepage

pkg:composer/icanboogie/bind-cldr

Statistics

Installs: 947

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v5.0.0 2018-12-01 13:27 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause d1733ac3026f2ae881a49778f4a60f4d8cca7cc2

This package is auto-updated.

Last update: 2026-06-21 03:44:42 UTC


README

👁 Packagist
👁 Code Quality
👁 Coverage Status
👁 Downloads

Binds icanboogie/cldr to ICanBoogie, using its Autoconfig feature.

<?php

/** @var ICanBoogie\Application $app */

use ICanBoogie\CLDR\Repository;
use ICanBoogie\Binding\CLDR\CurrentLocale;

# Getting the CLDR
$cldr = $app->service_for_class(Repository::class);
echo $cldr->locale_for('fr')->format_number("1234567.89"); // 1 234 567,89

# Getting the current locale, defaulting to 'en' locale
$current_locale = $app->service_for_class(CurrentLocale::class);
echo $current_locale->get()->id->value // en

# Change the current locale to 'fr'
$current_locale->set('fr')
echo $current_locale->get()->id->value // fr

Installation

composer require icanboogie/bind-cldr

Continuous Integration

The project is continuously tested by GitHub actions.

👁 Tests
👁 Static Analysis
👁 Code Style

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code.

Contributing

Please see CONTRIBUTING for details.

License

icanboogie/bind-cldr is released under the BSD-3-Clause.