Documentation

MessageFormatter
in package
implements MessageFormatterInterface, IntlFormatterInterface

Tags
author

Abdellatif Ait boudad a.aitboudad@gmail.com

Table of Contents

Interfaces

MessageFormatterInterface
IntlFormatterInterface
Formats ICU message patterns.

Properties

$intlFormatter  : mixed
$translator  : mixed

Methods

__construct()  : mixed
format()  : string
Formats a localized message pattern with given arguments.
formatIntl()  : string
Formats a localized message using rules defined by ICU MessageFormat.

Properties

Methods

format()

Formats a localized message pattern with given arguments.

public format(string $message, string $locale[, array<string|int, mixed> $parameters = [] ]) : string
Parameters
$message : string

The message (may also be an object that can be cast to string)

$locale : string

The message locale

$parameters : array<string|int, mixed> = []

An array of parameters for the message

Return values
string

formatIntl()

Formats a localized message using rules defined by ICU MessageFormat.

public formatIntl(string $message, string $locale[, array<string|int, mixed> $parameters = [] ]) : string
Parameters
$message : string
$locale : string
$parameters : array<string|int, mixed> = []
Return values
string

        
On this page

Search results