2017-01-18 16:58:48 +13:00
|
|
|
<?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
|
2017-01-25 16:35:13 +13:00
|
|
|
* @param int $count Number to pluralise against
|
2017-01-18 16:58:48 +13:00
|
|
|
* @return string Localised string
|
|
|
|
*/
|
2017-01-25 16:35:13 +13:00
|
|
|
public function pluralise($entity, $default, $injection, $count);
|
2017-01-18 16:58:48 +13:00
|
|
|
}
|