Download the PHP package bakame/laravel-intl-formatter without Composer

On this page you can find all versions of the php package bakame/laravel-intl-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-intl-formatter

Laravel Intl Formatter

Author Build Latest Version Total Downloads Sponsor development of this project

This is a Laravel port of the Twig Intl Extension package.

The package can be used in any Laravel based application to quickly handle internationalization by providing helper functions in Blade templates or Laravel codebase.

System Requirements

Installation

Use composer:

Configuration

In order to edit the default configuration you need to publish the package configuration to your application config directory:

The configuration file will be published to config/bakame-intl-formatter.php in your application directory.

Please refer to the config file for an overview of the available options.

Documentation

Once installed the package provides the following global helper functions:

Country Name

Returns the country name given its two-letter/five-letter code;

Currency Name

Returns the currency name given its three-letter code;

Currency Symbol

Returns the currency symbol given its three-letter code;

Language name

Returns the currency symbol given its three-letter code;

Locale name

Returns the currency symbol given its three-letter code;

Timezone name

Returns the timezone name given its identifier;

Country Timezones

Returns the timezone identifiers of the given country code;

Format Currency

Formats a number as a currency;

Format Number

Formats a number;

Format DateTime

Formats a date and time;

Format Date

Formats a the date portion of a datetime;

Format Time

Formats the time portion of a datetime;

Each function uses the same arguments in the same order as the Twig Extra package filters/functions.

Locale specification

If no locale is specified in function calls, the function will use the result of Illuminate\Support\Facades\App::currentLocale() as the locale value to use.

functions signature

In PHP8+, you can use named parameters to improve functions usages as they tend to have a lot of arguments:

In PHP7.4

In PHP8+

Contributing

Contributions are welcome and will be fully credited. Please see CODE OF CONDUCT for details.

Testing

The library:

To run the tests, run the following command from the project folder.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Attribution

The package helpers functions are heavily inspired by previous works done by Fabien Potencier on Twig Intl Extension.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-intl-formatter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-intl Version *
ext-json Version *
bakame/intl-formatter Version ~0.3.0
illuminate/config Version ^8.0 || ^9.0
illuminate/support Version ^8.0 || ^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bakame/laravel-intl-formatter contains the following files

Loading the files please wait ....