mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Rolled pluralisation functionality into the i18n::_t() method Warnings on missing default can now be turned off
31 lines
906 B
PHP
31 lines
906 B
PHP
<?php
|
|
|
|
namespace SilverStripe\i18n\Messages;
|
|
|
|
/**
|
|
* Provides localisation of messages
|
|
*/
|
|
interface MessageProvider
|
|
{
|
|
/**
|
|
* Localise this message
|
|
*
|
|
* @param string $entity Identifier for this message in Namespace.key format
|
|
* @param string $default Default message
|
|
* @param array $injection List of injection variables
|
|
* @return string Localised string
|
|
*/
|
|
public function translate($entity, $default, $injection);
|
|
|
|
/**
|
|
* Pluralise a message
|
|
*
|
|
* @param string $entity Identifier for this message in Namespace.key format
|
|
* @param array|string $default Default message with pipe-separated delimiters, or array
|
|
* @param array $injection List of injection variables
|
|
* @param int $count Number to pluralise against
|
|
* @return string Localised string
|
|
*/
|
|
public function pluralise($entity, $default, $injection, $count);
|
|
}
|