for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Part of the Joomla Framework DateTime Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU Lesser General Public License version 2.1 or later; see LICENSE
*/
namespace Joomla\DateTime\Translator;
* Base Translator class.
* @since 2.0.0
abstract class AbstractTranslator
{
* The locale to use.
* @var string
protected $locale = 'en';
* Sets the locale.
* @param string $locale The locale to set.
* @return void
public function setLocale($locale)
$this->locale = $locale;
}
* Returns a translated item.
* @param string $item The item to translate.
* @param array $replace An replace array.
* @return string
abstract public function get($item, array $replace = array());
* Returns a translated item with a proper form for pluralization.
* @param integer $number Number of items for pluralization.
abstract public function choice($item, $number, array $replace = array());