Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -11,15 +11,17 @@
namespace Carbon;
use Closure;
use DateInterval;
use InvalidArgumentException;
use Symfony\Component\Translation\Translator;
use ReflectionClass;
use ReflectionFunction;
use ReflectionMethod;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Translation\Loader\ArrayLoader;
/**
* A simple API extension for DateInterval.
* The implemenation provides helpers to handle weeks but only days are saved.
* The implementation provides helpers to handle weeks but only days are saved.
* Weeks are calculated based on the total days of the current instance.
*
* @property int $years Total years of the current interval.
@@ -29,9 +31,16 @@ use Symfony\Component\Translation\Loader\ArrayLoader;
* @property int $hours Total hours of the current interval.
* @property int $minutes Total minutes of the current interval.
* @property int $seconds Total seconds of the current interval.
*
* @property-read integer $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7).
* @property-read integer $daysExcludeWeeks alias of dayzExcludeWeeks
* @property-read int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7).
* @property-read int $daysExcludeWeeks alias of dayzExcludeWeeks
* @property-read float $totalYears Number of years equivalent to the interval.
* @property-read float $totalMonths Number of months equivalent to the interval.
* @property-read float $totalWeeks Number of weeks equivalent to the interval.
* @property-read float $totalDays Number of days equivalent to the interval.
* @property-read float $totalDayz Alias for totalDays.
* @property-read float $totalHours Number of hours equivalent to the interval.
* @property-read float $totalMinutes Number of minutes equivalent to the interval.
* @property-read float $totalSeconds Number of seconds equivalent to the interval.
*
* @method static CarbonInterval years($years = 1) Create instance specifying a number of years.
* @method static CarbonInterval year($years = 1) Alias for years()
@@ -48,21 +57,21 @@ use Symfony\Component\Translation\Loader\ArrayLoader;
* @method static CarbonInterval minute($minutes = 1) Alias for minutes()
* @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds.
* @method static CarbonInterval second($seconds = 1) Alias for seconds()
* @method CarbonInterval years() years($years = 1) Set the years portion of the current interval.
* @method CarbonInterval year() year($years = 1) Alias for years().
* @method CarbonInterval months() months($months = 1) Set the months portion of the current interval.
* @method CarbonInterval month() month($months = 1) Alias for months().
* @method CarbonInterval weeks() weeks($weeks = 1) Set the weeks portion of the current interval. Will overwrite dayz value.
* @method CarbonInterval week() week($weeks = 1) Alias for weeks().
* @method CarbonInterval days() days($days = 1) Set the days portion of the current interval.
* @method CarbonInterval dayz() dayz($days = 1) Alias for days().
* @method CarbonInterval day() day($days = 1) Alias for days().
* @method CarbonInterval hours() hours($hours = 1) Set the hours portion of the current interval.
* @method CarbonInterval hour() hour($hours = 1) Alias for hours().
* @method CarbonInterval minutes() minutes($minutes = 1) Set the minutes portion of the current interval.
* @method CarbonInterval minute() minute($minutes = 1) Alias for minutes().
* @method CarbonInterval seconds() seconds($seconds = 1) Set the seconds portion of the current interval.
* @method CarbonInterval second() second($seconds = 1) Alias for seconds().
* @method CarbonInterval years($years = 1) Set the years portion of the current interval.
* @method CarbonInterval year($years = 1) Alias for years().
* @method CarbonInterval months($months = 1) Set the months portion of the current interval.
* @method CarbonInterval month($months = 1) Alias for months().
* @method CarbonInterval weeks($weeks = 1) Set the weeks portion of the current interval. Will overwrite dayz value.
* @method CarbonInterval week($weeks = 1) Alias for weeks().
* @method CarbonInterval days($days = 1) Set the days portion of the current interval.
* @method CarbonInterval dayz($days = 1) Alias for days().
* @method CarbonInterval day($days = 1) Alias for days().
* @method CarbonInterval hours($hours = 1) Set the hours portion of the current interval.
* @method CarbonInterval hour($hours = 1) Alias for hours().
* @method CarbonInterval minutes($minutes = 1) Set the minutes portion of the current interval.
* @method CarbonInterval minute($minutes = 1) Alias for minutes().
* @method CarbonInterval seconds($seconds = 1) Set the seconds portion of the current interval.
* @method CarbonInterval second($seconds = 1) Alias for seconds().
*/
class CarbonInterval extends DateInterval
{
@@ -81,16 +90,81 @@ class CarbonInterval extends DateInterval
/**
* A translator to ... er ... translate stuff
*
* @var TranslatorInterface
* @var \Symfony\Component\Translation\TranslatorInterface
*/
protected static $translator;
/**
* @var array|null
*/
protected static $cascadeFactors;
/**
* @var array|null
*/
private static $flipCascadeFactors;
/**
* The registered macros.
*
* @var array
*/
protected static $macros = array();
/**
* Before PHP 5.4.20/5.5.4 instead of FALSE days will be set to -99999 when the interval instance
* was created by DateTime:diff().
* was created by DateTime::diff().
*/
const PHP_DAYS_FALSE = -99999;
/**
* Mapping of units and factors for cascading.
*
* Should only be modified by changing the factors or referenced constants.
*
* @return array
*/
public static function getCascadeFactors()
{
return static::$cascadeFactors ?: array(
'minutes' => array(Carbon::SECONDS_PER_MINUTE, 'seconds'),
'hours' => array(Carbon::MINUTES_PER_HOUR, 'minutes'),
'dayz' => array(Carbon::HOURS_PER_DAY, 'hours'),
'months' => array(Carbon::DAYS_PER_WEEK * Carbon::WEEKS_PER_MONTH, 'dayz'),
'years' => array(Carbon::MONTHS_PER_YEAR, 'months'),
);
}
private static function standardizeUnit($unit)
{
$unit = rtrim($unit, 'sz').'s';
return $unit === 'days' ? 'dayz' : $unit;
}
private static function getFlipCascadeFactors()
{
if (!self::$flipCascadeFactors) {
self::$flipCascadeFactors = array();
foreach (static::getCascadeFactors() as $to => $tuple) {
list($factor, $from) = $tuple;
self::$flipCascadeFactors[self::standardizeUnit($from)] = array(self::standardizeUnit($to), $factor);
}
}
return self::$flipCascadeFactors;
}
/**
* @param array $cascadeFactors
*/
public static function setCascadeFactors(array $cascadeFactors)
{
self::$flipCascadeFactors = null;
static::$cascadeFactors = $cascadeFactors;
}
/**
* Determine if the interval was created via DateTime:diff() or not.
*
@@ -120,32 +194,99 @@ class CarbonInterval extends DateInterval
*/
public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null)
{
$spec = static::PERIOD_PREFIX;
$spec = $years;
$spec .= $years > 0 ? $years.static::PERIOD_YEARS : '';
$spec .= $months > 0 ? $months.static::PERIOD_MONTHS : '';
if (!is_string($spec) || floatval($years) || preg_match('/^[0-9.]/', $years)) {
$spec = static::PERIOD_PREFIX;
$specDays = 0;
$specDays += $weeks > 0 ? $weeks * Carbon::DAYS_PER_WEEK : 0;
$specDays += $days > 0 ? $days : 0;
$spec .= $years > 0 ? $years.static::PERIOD_YEARS : '';
$spec .= $months > 0 ? $months.static::PERIOD_MONTHS : '';
$spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : '';
$specDays = 0;
$specDays += $weeks > 0 ? $weeks * static::getDaysPerWeek() : 0;
$specDays += $days > 0 ? $days : 0;
if ($hours > 0 || $minutes > 0 || $seconds > 0) {
$spec .= static::PERIOD_TIME_PREFIX;
$spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : '';
$spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : '';
$spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : '';
}
$spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : '';
if ($spec === static::PERIOD_PREFIX) {
// Allow the zero interval.
$spec .= '0'.static::PERIOD_YEARS;
if ($hours > 0 || $minutes > 0 || $seconds > 0) {
$spec .= static::PERIOD_TIME_PREFIX;
$spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : '';
$spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : '';
$spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : '';
}
if ($spec === static::PERIOD_PREFIX) {
// Allow the zero interval.
$spec .= '0'.static::PERIOD_YEARS;
}
}
parent::__construct($spec);
}
/**
* Returns the factor for a given source-to-target couple.
*
* @param string $source
* @param string $target
*
* @return int|null
*/
public static function getFactor($source, $target)
{
$source = self::standardizeUnit($source);
$target = self::standardizeUnit($target);
$factors = static::getFlipCascadeFactors();
if (isset($factors[$source])) {
list($to, $factor) = $factors[$source];
if ($to === $target) {
return $factor;
}
}
return null;
}
/**
* Returns current config for days per week.
*
* @return int
*/
public static function getDaysPerWeek()
{
return static::getFactor('dayz', 'weeks') ?: Carbon::DAYS_PER_WEEK;
}
/**
* Returns current config for hours per day.
*
* @return int
*/
public static function getHoursPerDay()
{
return static::getFactor('hours', 'dayz') ?: Carbon::HOURS_PER_DAY;
}
/**
* Returns current config for minutes per hour.
*
* @return int
*/
public static function getMinutesPerHours()
{
return static::getFactor('minutes', 'hours') ?: Carbon::MINUTES_PER_HOUR;
}
/**
* Returns current config for seconds per minute.
*
* @return int
*/
public static function getSecondsPerMinutes()
{
return static::getFactor('seconds', 'minutes') ?: Carbon::SECONDS_PER_MINUTE;
}
/**
* Create a new CarbonInterval instance from specific values.
* This is an alias for the constructor that allows better fluent
@@ -167,6 +308,19 @@ class CarbonInterval extends DateInterval
return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds);
}
/**
* Get a copy of the instance.
*
* @return static
*/
public function copy()
{
$date = new static($this->spec());
$date->invert = $this->invert;
return $date;
}
/**
* Provide static helpers to create instances. Allows CarbonInterval::years(3).
*
@@ -212,6 +366,123 @@ class CarbonInterval extends DateInterval
case 'second':
return new static(null, null, null, null, null, null, $arg);
}
if (static::hasMacro($name)) {
return call_user_func_array(
array(new static(0), $name), $args
);
}
}
/**
* Creates a CarbonInterval from string.
*
* Format:
*
* Suffix | Unit | Example | DateInterval expression
* -------|---------|---------|------------------------
* y | years | 1y | P1Y
* mo | months | 3mo | P3M
* w | weeks | 2w | P2W
* d | days | 28d | P28D
* h | hours | 4h | PT4H
* m | minutes | 12m | PT12M
* s | seconds | 59s | PT59S
*
* e. g. `1w 3d 4h 32m 23s` is converted to 10 days 4 hours 32 minutes and 23 seconds.
*
* Special cases:
* - An empty string will return a zero interval
* - Fractions are allowed for weeks, days, hours and minutes and will be converted
* and rounded to the next smaller value (caution: 0.5w = 4d)
*
* @param string $intervalDefinition
*
* @return static
*/
public static function fromString($intervalDefinition)
{
if (empty($intervalDefinition)) {
return new static(0);
}
$years = 0;
$months = 0;
$weeks = 0;
$days = 0;
$hours = 0;
$minutes = 0;
$seconds = 0;
$pattern = '/(\d+(?:\.\d+)?)\h*([^\d\h]*)/i';
preg_match_all($pattern, $intervalDefinition, $parts, PREG_SET_ORDER);
while ($match = array_shift($parts)) {
list($part, $value, $unit) = $match;
$intValue = intval($value);
$fraction = floatval($value) - $intValue;
switch (strtolower($unit)) {
case 'year':
case 'years':
case 'y':
$years += $intValue;
break;
case 'month':
case 'months':
case 'mo':
$months += $intValue;
break;
case 'week':
case 'weeks':
case 'w':
$weeks += $intValue;
if ($fraction) {
$parts[] = array(null, $fraction * static::getDaysPerWeek(), 'd');
}
break;
case 'day':
case 'days':
case 'd':
$days += $intValue;
if ($fraction) {
$parts[] = array(null, $fraction * static::getHoursPerDay(), 'h');
}
break;
case 'hour':
case 'hours':
case 'h':
$hours += $intValue;
if ($fraction) {
$parts[] = array(null, $fraction * static::getMinutesPerHours(), 'm');
}
break;
case 'minute':
case 'minutes':
case 'm':
$minutes += $intValue;
if ($fraction) {
$seconds += round($fraction * static::getSecondsPerMinutes());
}
break;
case 'second':
case 'seconds':
case 's':
$seconds += $intValue;
break;
default:
throw new InvalidArgumentException(
sprintf('Invalid part %s in definition %s', $part, $intervalDefinition)
);
}
}
return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds);
}
/**
@@ -221,47 +492,67 @@ class CarbonInterval extends DateInterval
*
* @param DateInterval $di
*
* @throws InvalidArgumentException
*
* @return static
*/
public static function instance(DateInterval $di)
{
if (static::wasCreatedFromDiff($di)) {
throw new InvalidArgumentException("Can not instance a DateInterval object created from DateTime::diff().");
}
$instance = new static($di->y, $di->m, 0, $di->d, $di->h, $di->i, $di->s);
$instance = new static(static::getDateIntervalSpec($di));
$instance->invert = $di->invert;
$instance->days = $di->days;
return $instance;
}
/**
* Make a CarbonInterval instance from given variable if possible.
*
* Always return a new instance. Parse only strings and only these likely to be intervals (skip dates
* and recurrences). Throw an exception for invalid format, but otherwise return null.
*
* @param mixed $var
*
* @return static|null
*/
public static function make($var)
{
if ($var instanceof DateInterval) {
return static::instance($var);
}
if (is_string($var)) {
$var = trim($var);
if (substr($var, 0, 1) === 'P') {
return new static($var);
}
if (preg_match('/^(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+$/i', $var)) {
return static::fromString($var);
}
}
}
///////////////////////////////////////////////////////////////////
/////////////////////// LOCALIZATION //////////////////////////////
///////////////////////////////////////////////////////////////////
/**
* Intialize the translator instance if necessary.
* Initialize the translator instance if necessary.
*
* @return TranslatorInterface
* @return \Symfony\Component\Translation\TranslatorInterface
*/
protected static function translator()
{
if (static::$translator === null) {
static::$translator = new Translator('en');
static::$translator->addLoader('array', new ArrayLoader());
static::setLocale('en');
static::$translator = Translator::get();
}
return static::$translator;
}
/**
* Get the translator instance in use
* Get the translator instance in use.
*
* @return TranslatorInterface
* @return \Symfony\Component\Translation\TranslatorInterface
*/
public static function getTranslator()
{
@@ -269,7 +560,7 @@ class CarbonInterval extends DateInterval
}
/**
* Set the translator instance to use
* Set the translator instance to use.
*
* @param TranslatorInterface $translator
*/
@@ -279,7 +570,7 @@ class CarbonInterval extends DateInterval
}
/**
* Get the current translator locale
* Get the current translator locale.
*
* @return string
*/
@@ -289,16 +580,13 @@ class CarbonInterval extends DateInterval
}
/**
* Set the current translator locale
* Set the current translator locale.
*
* @param string $locale
*/
public static function setLocale($locale)
{
static::translator()->setLocale($locale);
// Ensure the locale has been loaded.
static::translator()->addResource('array', require __DIR__.'/Lang/'.$locale.'.php', $locale);
return static::translator()->setLocale($locale) !== false;
}
///////////////////////////////////////////////////////////////////
@@ -306,16 +594,20 @@ class CarbonInterval extends DateInterval
///////////////////////////////////////////////////////////////////
/**
* Get a part of the CarbonInterval object
* Get a part of the CarbonInterval object.
*
* @param string $name
*
* @throws InvalidArgumentException
* @throws \InvalidArgumentException
*
* @return int
* @return int|float
*/
public function __get($name)
{
if (substr($name, 0, 5) === 'total') {
return $this->total(substr($name, 5));
}
switch ($name) {
case 'years':
return $this->y;
@@ -336,11 +628,11 @@ class CarbonInterval extends DateInterval
return $this->s;
case 'weeks':
return (int)floor($this->d / Carbon::DAYS_PER_WEEK);
return (int) floor($this->d / static::getDaysPerWeek());
case 'daysExcludeWeeks':
case 'dayzExcludeWeeks':
return $this->d % Carbon::DAYS_PER_WEEK;
return $this->d % static::getDaysPerWeek();
default:
throw new InvalidArgumentException(sprintf("Unknown getter '%s'", $name));
@@ -348,12 +640,12 @@ class CarbonInterval extends DateInterval
}
/**
* Set a part of the CarbonInterval object
* Set a part of the CarbonInterval object.
*
* @param string $name
* @param int $val
*
* @throws InvalidArgumentException
* @throws \InvalidArgumentException
*/
public function __set($name, $val)
{
@@ -367,7 +659,7 @@ class CarbonInterval extends DateInterval
break;
case 'weeks':
$this->d = $val * Carbon::DAYS_PER_WEEK;
$this->d = $val * static::getDaysPerWeek();
break;
case 'dayz':
@@ -398,11 +690,94 @@ class CarbonInterval extends DateInterval
*/
public function weeksAndDays($weeks, $days)
{
$this->dayz = ($weeks * Carbon::DAYS_PER_WEEK) + $days;
$this->dayz = ($weeks * static::getDaysPerWeek()) + $days;
return $this;
}
/**
* Register a custom macro.
*
* @param string $name
* @param object|callable $macro
*
* @return void
*/
public static function macro($name, $macro)
{
static::$macros[$name] = $macro;
}
/**
* Register macros from a mixin object.
*
* @param object $mixin
*
* @throws \ReflectionException
*
* @return void
*/
public static function mixin($mixin)
{
$reflection = new ReflectionClass($mixin);
$methods = $reflection->getMethods(
ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED
);
foreach ($methods as $method) {
$method->setAccessible(true);
static::macro($method->name, $method->invoke($mixin));
}
}
/**
* Check if macro is registered.
*
* @param string $name
*
* @return bool
*/
public static function hasMacro($name)
{
return isset(static::$macros[$name]);
}
/**
* Call given macro.
*
* @param string $name
* @param array $parameters
*
* @return mixed
*/
protected function callMacro($name, $parameters)
{
$macro = static::$macros[$name];
$reflection = new ReflectionFunction($macro);
$reflectionParameters = $reflection->getParameters();
$expectedCount = count($reflectionParameters);
$actualCount = count($parameters);
if ($expectedCount > $actualCount && $reflectionParameters[$expectedCount - 1]->name === 'self') {
for ($i = $actualCount; $i < $expectedCount - 1; $i++) {
$parameters[] = $reflectionParameters[$i]->getDefaultValue();
}
$parameters[] = $this;
}
if ($macro instanceof Closure && method_exists($macro, 'bindTo')) {
$macro = $macro->bindTo($this, get_class($this));
}
return call_user_func_array($macro, $parameters);
}
/**
* Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day().
*
@@ -416,6 +791,10 @@ class CarbonInterval extends DateInterval
*/
public function __call($name, $args)
{
if (static::hasMacro($name)) {
return $this->callMacro($name, $args);
}
$arg = count($args) === 0 ? 1 : $args[0];
switch ($name) {
@@ -431,7 +810,7 @@ class CarbonInterval extends DateInterval
case 'weeks':
case 'week':
$this->dayz = $arg * Carbon::DAYS_PER_WEEK;
$this->dayz = $arg * static::getDaysPerWeek();
break;
case 'days':
@@ -462,24 +841,27 @@ class CarbonInterval extends DateInterval
/**
* Get the current interval in a human readable format in the current locale.
*
* @param bool $short (false by default), returns short units if true
*
* @return string
*/
public function forHumans()
public function forHumans($short = false)
{
$periods = array(
'year' => $this->years,
'month' => $this->months,
'week' => $this->weeks,
'day' => $this->daysExcludeWeeks,
'hour' => $this->hours,
'minute' => $this->minutes,
'second' => $this->seconds,
'year' => array('y', $this->years),
'month' => array('m', $this->months),
'week' => array('w', $this->weeks),
'day' => array('d', $this->daysExcludeWeeks),
'hour' => array('h', $this->hours),
'minute' => array('min', $this->minutes),
'second' => array('s', $this->seconds),
);
$parts = array();
foreach ($periods as $unit => $count) {
foreach ($periods as $unit => $options) {
list($shortUnit, $count) = $options;
if ($count > 0) {
array_push($parts, static::translator()->transChoice($unit, $count, array(':count' => $count)));
$parts[] = static::translator()->transChoice($short ? $shortUnit : $unit, $count, array(':count' => $count));
}
}
@@ -497,7 +879,31 @@ class CarbonInterval extends DateInterval
}
/**
* Add the passed interval to the current instance
* Convert the interval to a CarbonPeriod.
*
* @return CarbonPeriod
*/
public function toPeriod()
{
return CarbonPeriod::createFromArray(
array_merge(array($this), func_get_args())
);
}
/**
* Invert the interval.
*
* @return $this
*/
public function invert()
{
$this->invert = $this->invert ? 0 : 1;
return $this;
}
/**
* Add the passed interval to the current instance.
*
* @param DateInterval $interval
*
@@ -508,16 +914,217 @@ class CarbonInterval extends DateInterval
$sign = $interval->invert === 1 ? -1 : 1;
if (static::wasCreatedFromDiff($interval)) {
$this->dayz = $this->dayz + $interval->days * $sign;
$this->dayz += $interval->days * $sign;
} else {
$this->years = $this->years + $interval->y * $sign;
$this->months = $this->months + $interval->m * $sign;
$this->dayz = $this->dayz + $interval->d * $sign;
$this->hours = $this->hours + $interval->h * $sign;
$this->minutes = $this->minutes + $interval->i * $sign;
$this->seconds = $this->seconds + $interval->s * $sign;
$this->years += $interval->y * $sign;
$this->months += $interval->m * $sign;
$this->dayz += $interval->d * $sign;
$this->hours += $interval->h * $sign;
$this->minutes += $interval->i * $sign;
$this->seconds += $interval->s * $sign;
}
return $this;
}
/**
* Multiply current instance given number of times
*
* @param float $factor
*
* @return $this
*/
public function times($factor)
{
if ($factor < 0) {
$this->invert = $this->invert ? 0 : 1;
$factor = -$factor;
}
$this->years = (int) round($this->years * $factor);
$this->months = (int) round($this->months * $factor);
$this->dayz = (int) round($this->dayz * $factor);
$this->hours = (int) round($this->hours * $factor);
$this->minutes = (int) round($this->minutes * $factor);
$this->seconds = (int) round($this->seconds * $factor);
return $this;
}
/**
* Get the interval_spec string of a date interval.
*
* @param DateInterval $interval
*
* @return string
*/
public static function getDateIntervalSpec(DateInterval $interval)
{
$date = array_filter(array(
static::PERIOD_YEARS => $interval->y,
static::PERIOD_MONTHS => $interval->m,
static::PERIOD_DAYS => $interval->d,
));
$time = array_filter(array(
static::PERIOD_HOURS => $interval->h,
static::PERIOD_MINUTES => $interval->i,
static::PERIOD_SECONDS => $interval->s,
));
$specString = static::PERIOD_PREFIX;
foreach ($date as $key => $value) {
$specString .= $value.$key;
}
if (count($time) > 0) {
$specString .= static::PERIOD_TIME_PREFIX;
foreach ($time as $key => $value) {
$specString .= $value.$key;
}
}
return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString;
}
/**
* Get the interval_spec string.
*
* @return string
*/
public function spec()
{
return static::getDateIntervalSpec($this);
}
/**
* Comparing 2 date intervals.
*
* @param DateInterval $a
* @param DateInterval $b
*
* @return int
*/
public static function compareDateIntervals(DateInterval $a, DateInterval $b)
{
$current = Carbon::now();
$passed = $current->copy()->add($b);
$current->add($a);
if ($current < $passed) {
return -1;
}
if ($current > $passed) {
return 1;
}
return 0;
}
/**
* Comparing with passed interval.
*
* @param DateInterval $interval
*
* @return int
*/
public function compare(DateInterval $interval)
{
return static::compareDateIntervals($this, $interval);
}
/**
* Convert overflowed values into bigger units.
*
* @return $this
*/
public function cascade()
{
foreach (static::getFlipCascadeFactors() as $source => $cascade) {
list($target, $factor) = $cascade;
if ($source === 'dayz' && $target === 'weeks') {
continue;
}
$value = $this->$source;
$this->$source = $modulo = $value % $factor;
$this->$target += ($value - $modulo) / $factor;
}
return $this;
}
/**
* Get amount of given unit equivalent to the interval.
*
* @param string $unit
*
* @throws \InvalidArgumentException
*
* @return float
*/
public function total($unit)
{
$realUnit = $unit = strtolower($unit);
if (in_array($unit, array('days', 'weeks'))) {
$realUnit = 'dayz';
} elseif (!in_array($unit, array('seconds', 'minutes', 'hours', 'dayz', 'months', 'years'))) {
throw new InvalidArgumentException("Unknown unit '$unit'.");
}
$result = 0;
$cumulativeFactor = 0;
$unitFound = false;
foreach (static::getFlipCascadeFactors() as $source => $cascade) {
list($target, $factor) = $cascade;
if ($source === $realUnit) {
$unitFound = true;
$result += $this->$source;
$cumulativeFactor = 1;
}
if ($factor === false) {
if ($unitFound) {
break;
}
$result = 0;
$cumulativeFactor = 0;
continue;
}
if ($target === $realUnit) {
$unitFound = true;
}
if ($cumulativeFactor) {
$cumulativeFactor *= $factor;
$result += $this->$target * $cumulativeFactor;
continue;
}
$result = ($result + $this->$source) / $factor;
}
if (isset($target) && !$cumulativeFactor) {
$result += $this->$target;
}
if (!$unitFound) {
throw new \InvalidArgumentException("Unit $unit have no configuration to get total from other units.");
}
if ($unit === 'weeks') {
return $result / static::getDaysPerWeek();
}
return $result;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,67 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use Exception;
use InvalidArgumentException;
class InvalidDateException extends InvalidArgumentException
{
/**
* The invalid field.
*
* @var string
*/
private $field;
/**
* The invalid value.
*
* @var mixed
*/
private $value;
/**
* Constructor.
*
* @param string $field
* @param mixed $value
* @param int $code
* @param \Exception|null $previous
*/
public function __construct($field, $value, $code = 0, Exception $previous = null)
{
$this->field = $field;
$this->value = $value;
parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous);
}
/**
* Get the invalid field.
*
* @return string
*/
public function getField()
{
return $this->field;
}
/**
* Get the invalid value.
*
* @return mixed
*/
public function getValue()
{
return $this->value;
}
}

View File

@@ -9,20 +9,23 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 jaar|:count jare',
'month' => '1 maand|:count maande',
'week' => '1 week|:count weke',
'day' => '1 dag|:count dae',
'hour' => '1 uur|:count ure',
'minute' => '1 minuut|:count minute',
'second' => '1 sekond|:count sekondes',
'ago' => ':time terug',
'from_now' => ':time van nou af',
'after' => ':time na',
'before' => ':time voor',
'year' => ':count jaar|:count jare',
'y' => ':count jaar|:count jare',
'month' => ':count maand|:count maande',
'm' => ':count maand|:count maande',
'week' => ':count week|:count weke',
'w' => ':count week|:count weke',
'day' => ':count dag|:count dae',
'd' => ':count dag|:count dae',
'hour' => ':count uur|:count ure',
'h' => ':count uur|:count ure',
'minute' => ':count minuut|:count minute',
'min' => ':count minuut|:count minute',
'second' => ':count sekond|:count sekondes',
's' => ':count sekond|:count sekondes',
'ago' => ':time terug',
'from_now' => ':time van nou af',
'after' => ':time na',
'before' => ':time voor',
);

View File

@@ -8,24 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ar/date.php
*/
return array(
'year' => '{0}سنة|{1}سنة|{2}سنتين|[3,10]:count سنوات|[11,Inf]:count سنة',
'month' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر',
'week' => '{0}إسبوع|{1}إسبوع|{2}إسبوعين|[3,10]:count أسابيع|[11,Inf]:count إسبوع',
'day' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم',
'hour' => '{0}ساعة|{1}ساعة|{2}ساعتين|[3,10]:count ساعات|[11,Inf]:count ساعة',
'minute' => '{0}دقيقة|{1}دقيقة|{2}دقيقتين|[3,10]:count دقائق|[11,Inf]:count دقيقة',
'second' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية',
'ago' => 'منذ :time',
'from_now' => 'من الآن :time',
'after' => 'بعد :time',
'before' => 'قبل :time',
'year' => '{0}سنة|{1}سنة|{2}سنتين|[3,10]:count سنوات|[11,Inf]:count سنة',
'y' => '{0}سنة|{1}سنة|{2}سنتين|[3,10]:count سنوات|[11,Inf]:count سنة',
'month' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر',
'm' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر',
'week' => '{0}أسبوع|{1}أسبوع|{2}أسبوعين|[3,10]:count أسابيع|[11,Inf]:count أسبوع',
'w' => '{0}أسبوع|{1}أسبوع|{2}أسبوعين|[3,10]:count أسابيع|[11,Inf]:count أسبوع',
'day' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم',
'd' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم',
'hour' => '{0}ساعة|{1}ساعة|{2}ساعتين|[3,10]:count ساعات|[11,Inf]:count ساعة',
'h' => '{0}ساعة|{1}ساعة|{2}ساعتين|[3,10]:count ساعات|[11,Inf]:count ساعة',
'minute' => '{0}دقيقة|{1}دقيقة|{2}دقيقتين|[3,10]:count دقائق|[11,Inf]:count دقيقة',
'min' => '{0}دقيقة|{1}دقيقة|{2}دقيقتين|[3,10]:count دقائق|[11,Inf]:count دقيقة',
'second' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية',
's' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية',
'ago' => 'منذ :time',
'from_now' => ':time من الآن',
'after' => 'بعد :time',
'before' => 'قبل :time',
);

View File

@@ -0,0 +1,31 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '[0,1] سَنَة|{2} سَنَتَيْن|[3,10]:count سَنَوَات|[11,Inf]:count سَنَة',
'y' => '[0,1] سَنَة|{2} سَنَتَيْن|[3,10]:count سَنَوَات|[11,Inf]:count سَنَة',
'month' => '[0,1] شَهْرَ|{2} شَهْرَيْن|[3,10]:count أَشْهُر|[11,Inf]:count شَهْرَ',
'm' => '[0,1] شَهْرَ|{2} شَهْرَيْن|[3,10]:count أَشْهُر|[11,Inf]:count شَهْرَ',
'week' => '[0,1] أُسْبُوع|{2} أُسْبُوعَيْن|[3,10]:count أَسَابِيع|[11,Inf]:count أُسْبُوع',
'w' => '[0,1] أُسْبُوع|{2} أُسْبُوعَيْن|[3,10]:count أَسَابِيع|[11,Inf]:count أُسْبُوع',
'day' => '[0,1] يَوْم|{2} يَوْمَيْن|[3,10]:count أَيَّام|[11,Inf] يَوْم',
'd' => '[0,1] يَوْم|{2} يَوْمَيْن|[3,10]:count أَيَّام|[11,Inf] يَوْم',
'hour' => '[0,1] سَاعَة|{2} سَاعَتَيْن|[3,10]:count سَاعَات|[11,Inf]:count سَاعَة',
'h' => '[0,1] سَاعَة|{2} سَاعَتَيْن|[3,10]:count سَاعَات|[11,Inf]:count سَاعَة',
'minute' => '[0,1] دَقِيقَة|{2} دَقِيقَتَيْن|[3,10]:count دَقَائِق|[11,Inf]:count دَقِيقَة',
'min' => '[0,1] دَقِيقَة|{2} دَقِيقَتَيْن|[3,10]:count دَقَائِق|[11,Inf]:count دَقِيقَة',
'second' => '[0,1] ثَانِيَة|{2} ثَانِيَتَيْن|[3,10]:count ثَوَان|[11,Inf]:count ثَانِيَة',
's' => '[0,1] ثَانِيَة|{2} ثَانِيَتَيْن|[3,10]:count ثَوَان|[11,Inf]:count ثَانِيَة',
'ago' => 'مُنْذُ :time',
'from_now' => 'مِنَ الْآن :time',
'after' => 'بَعْدَ :time',
'before' => 'قَبْلَ :time',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/The-Hasanov/laravel-date/blob/1006f37c431178b5c7219d02c93579c9690ae546/src/Lang/az.php
*/
return array(
'year' => ':count il',
'month' => ':count ay',
'week' => ':count həftə',
'day' => ':count gün',
'hour' => ':count saat',
'minute' => ':count dəqiqə',
'second' => ':count saniyə',
'ago' => ':time öncə',
'from_now' => ':time sonra',
'after' => ':time sonra',
'before' => ':time öncə'
'year' => ':count il',
'y' => ':count il',
'month' => ':count ay',
'm' => ':count ay',
'week' => ':count həftə',
'w' => ':count həftə',
'day' => ':count gün',
'd' => ':count gün',
'hour' => ':count saat',
'h' => ':count saat',
'minute' => ':count dəqiqə',
'min' => ':count dəqiqə',
'second' => ':count saniyə',
's' => ':count saniyə',
'ago' => ':time əvvəl',
'from_now' => ':time sonra',
'after' => ':time sonra',
'before' => ':time əvvəl',
);

View File

@@ -8,24 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/bg/date.php
*/
return array(
'year' => '1 година|:count години',
'month' => '1 месец|:count месеца',
'week' => '1 седмица|:count седмици',
'day' => '1 ден|:count дни',
'hour' => '1 час|:count часа',
'minute' => '1 минута|:count минути',
'second' => '1 секунда|:count секунди',
'ago' => 'преди :time',
'from_now' => ':time от сега',
'after' => 'след :time',
'before' => 'преди :time',
'year' => ':count година|:count години',
'y' => ':count година|:count години',
'month' => ':count месец|:count месеца',
'm' => ':count месец|:count месеца',
'week' => ':count седмица|:count седмици',
'w' => ':count седмица|:count седмици',
'day' => ':count ден|:count дни',
'd' => ':count ден|:count дни',
'hour' => ':count час|:count часа',
'h' => ':count час|:count часа',
'minute' => ':count минута|:count минути',
'min' => ':count минута|:count минути',
'second' => ':count секунда|:count секунди',
's' => ':count секунда|:count секунди',
'ago' => 'преди :time',
'from_now' => ':time от сега',
'after' => 'след :time',
'before' => 'преди :time',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/eu/date.php
*/
return array(
'year' => '১ বছর|:count বছর',
'month' => '১ মাস|:count মাস',
'week' => '১ সপ্তাহ|:count সপ্তাহ',
'day' => '১ দিন|:count দিন',
'hour' => '১ ঘন্টা|:count ঘন্টা',
'minute' => '১ মিনিট|:count মিনিট',
'second' => '১ সেকেন্ড|:count সেকেন্ড',
'ago' => ':time পূর্বে',
'from_now' => 'এখন থেকে :time',
'after' => ':time পরে',
'before' => ':time আগে',
'year' => '১ বছর|:count বছর',
'y' => '১ বছর|:count বছর',
'month' => '১ মাস|:count মাস',
'm' => '১ মাস|:count মাস',
'week' => '১ সপ্তাহ|:count সপ্তাহ',
'w' => '১ সপ্তাহ|:count সপ্তাহ',
'day' => '১ দিন|:count দিন',
'd' => '১ দিন|:count দিন',
'hour' => '১ ঘন্টা|:count ঘন্টা',
'h' => '১ ঘন্টা|:count ঘন্টা',
'minute' => '১ মিনিট|:count মিনিট',
'min' => '১ মিনিট|:count মিনিট',
'second' => '১ সেকেন্ড|:count সেকেন্ড',
's' => '১ সেকেন্ড|:count সেকেন্ড',
'ago' => ':time পূর্বে',
'from_now' => 'এখন থেকে :time',
'after' => ':time পরে',
'before' => ':time আগে',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count godina|:count godine|:count godina',
'y' => ':count godina|:count godine|:count godina',
'month' => ':count mjesec|:count mjeseca|:count mjeseci',
'm' => ':count mjesec|:count mjeseca|:count mjeseci',
'week' => ':count nedjelja|:count nedjelje|:count nedjelja',
'w' => ':count nedjelja|:count nedjelje|:count nedjelja',
'day' => ':count dan|:count dana|:count dana',
'd' => ':count dan|:count dana|:count dana',
'hour' => ':count sat|:count sata|:count sati',
'h' => ':count sat|:count sata|:count sati',
'minute' => ':count minut|:count minuta|:count minuta',
'min' => ':count minut|:count minuta|:count minuta',
'second' => ':count sekund|:count sekunda|:count sekundi',
's' => ':count sekund|:count sekunda|:count sekundi',
'ago' => 'prije :time',
'from_now' => 'za :time',
'after' => 'nakon :time',
'before' => ':time ranije',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,33 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ca/date.php
*/
return array(
'year' => '1 any|:count anys',
'month' => '1 mes|:count mesos',
'week' => '1 setmana|:count setmanes',
'day' => '1 dia|:count díes',
'hour' => '1 hora|:count hores',
'minute' => '1 minut|:count minuts',
'second' => '1 segon|:count segons',
'ago' => 'Fa :time',
'from_now' => 'Dins de :time',
'after' => ':time després',
'before' => ':time abans',
'year' => ':count any|:count anys',
'y' => ':count any|:count anys',
'month' => ':count mes|:count mesos',
'm' => ':count mes|:count mesos',
'week' => ':count setmana|:count setmanes',
'w' => ':count setmana|:count setmanes',
'day' => ':count dia|:count dies',
'd' => ':count dia|:count dies',
'hour' => ':count hora|:count hores',
'h' => ':count hora|:count hores',
'minute' => ':count minut|:count minuts',
'min' => ':count minut|:count minuts',
'second' => ':count segon|:count segons',
's' => ':count segon|:count segons',
'ago' => 'fa :time',
'from_now' => 'dins de :time',
'after' => ':time després',
'before' => ':time abans',
'diff_now' => 'ara mateix',
'diff_yesterday' => 'ahir',
'diff_tomorrow' => 'demà',
'diff_before_yesterday' => "abans d'ahir",
'diff_after_tomorrow' => 'demà passat',
'period_recurrences' => ':count cop|:count cops',
'period_interval' => 'cada :interval',
'period_start_date' => 'de :date',
'period_end_date' => 'fins a :date',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/cs/date.php
*/
return array(
'year' => '1 rok|:count roky|:count let',
'month' => '1 měsíc|:count měsíce|:count měsíců',
'week' => '1 týden|:count týdny|:count týdnů',
'day' => '1 den|:count dny|:count dní',
'hour' => '1 hodinu|:count hodiny|:count hodin',
'minute' => '1 minutu|:count minuty|:count minut',
'second' => '1 sekundu|:count sekundy|:count sekund',
'ago' => 'před :time',
'from_now' => 'za :time',
'after' => ':time později',
'before' => ':time předtím',
'year' => ':count rok|:count roky|:count let',
'y' => ':count rok|:count roky|:count let',
'month' => ':count měsíc|:count měsíce|:count měsíců',
'm' => ':count měsíc|:count měsíce|:count měsíců',
'week' => ':count týden|:count týdny|:count týdnů',
'w' => ':count týden|:count týdny|:count týdnů',
'day' => ':count den|:count dny|:count dní',
'd' => ':count den|:count dny|:count dní',
'hour' => ':count hodinu|:count hodiny|:count hodin',
'h' => ':count hodinu|:count hodiny|:count hodin',
'minute' => ':count minutu|:count minuty|:count minut',
'min' => ':count minutu|:count minuty|:count minut',
'second' => ':count sekundu|:count sekundy|:count sekund',
's' => ':count sekundu|:count sekundy|:count sekund',
'ago' => ':time nazpět',
'from_now' => 'za :time',
'after' => ':time později',
'before' => ':time předtím',
);

View File

@@ -0,0 +1,29 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '1 flwyddyn|:count blynedd',
'y' => ':countbl',
'month' => '1 mis|:count fis',
'm' => ':countmi',
'week' => ':count wythnos',
'w' => ':countw',
'day' => ':count diwrnod',
'd' => ':countd',
'hour' => ':count awr',
'h' => ':counth',
'minute' => ':count munud',
'min' => ':countm',
'second' => ':count eiliad',
's' => ':counts',
'ago' => ':time yn ôl',
'from_now' => ':time o hyn ymlaen',
'after' => ':time ar ôl',
'before' => ':time o\'r blaen',
);

View File

@@ -9,20 +9,23 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 år|:count år',
'month' => '1 måned|:count måneder',
'week' => '1 uge|:count uger',
'day' => '1 dag|:count dage',
'hour' => '1 time|:count timer',
'minute' => '1 minut|:count minutter',
'second' => '1 sekund|:count sekunder',
'ago' => ':time siden',
'from_now' => 'om :time',
'after' => ':time efter',
'before' => ':time før',
'year' => ':count år|:count år',
'y' => ':count år|:count år',
'month' => ':count måned|:count måneder',
'm' => ':count måned|:count måneder',
'week' => ':count uge|:count uger',
'w' => ':count uge|:count uger',
'day' => ':count dag|:count dage',
'd' => ':count dag|:count dage',
'hour' => ':count time|:count timer',
'h' => ':count time|:count timer',
'minute' => ':count minut|:count minutter',
'min' => ':count minut|:count minutter',
'second' => ':count sekund|:count sekunder',
's' => ':count sekund|:count sekunder',
'ago' => ':time siden',
'from_now' => 'om :time',
'after' => ':time efter',
'before' => ':time før',
);

View File

@@ -3,36 +3,44 @@
/*
* This file is part of the Carbon package.
*
* (c) Michael Hohl <me@michaelhohl.net>
* (c) Brian Nesbitt <brian@nesbot.com>
*
* This file is released under the terms of CC0.
* CC0 is even more permissive than the MIT license, allowing you to use the code in
* any manner you want, without any copyright headers, notices, or other attribution.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 Jahr|:count Jahre',
'month' => '1 Monat|:count Monate',
'week' => '1 Woche|:count Wochen',
'day' => '1 Tag|:count Tage',
'hour' => '1 Stunde|:count Stunden',
'minute' => '1 Minute|:count Minuten',
'second' => '1 Sekunde|:count Sekunden',
'ago' => 'vor :time',
'from_now' => 'in :time',
'after' => ':time später',
'before' => ':time zuvor',
'year' => ':count Jahr|:count Jahre',
'y' => ':countJ|:countJ',
'month' => ':count Monat|:count Monate',
'm' => ':countMon|:countMon',
'week' => ':count Woche|:count Wochen',
'w' => ':countWo|:countWo',
'day' => ':count Tag|:count Tage',
'd' => ':countTg|:countTg',
'hour' => ':count Stunde|:count Stunden',
'h' => ':countStd|:countStd',
'minute' => ':count Minute|:count Minuten',
'min' => ':countMin|:countMin',
'second' => ':count Sekunde|:count Sekunden',
's' => ':countSek|:countSek',
'ago' => 'vor :time',
'from_now' => 'in :time',
'after' => ':time später',
'before' => ':time zuvor',
'year_from_now' => '1 Jahr|:count Jahren',
'month_from_now' => '1 Monat|:count Monaten',
'week_from_now' => '1 Woche|:count Wochen',
'day_from_now' => '1 Tag|:count Tagen',
'year_ago' => '1 Jahr|:count Jahren',
'month_ago' => '1 Monat|:count Monaten',
'week_ago' => '1 Woche|:count Wochen',
'day_ago' => '1 Tag|:count Tagen',
'year_from_now' => ':count Jahr|:count Jahren',
'month_from_now' => ':count Monat|:count Monaten',
'week_from_now' => ':count Woche|:count Wochen',
'day_from_now' => ':count Tag|:count Tagen',
'year_ago' => ':count Jahr|:count Jahren',
'month_ago' => ':count Monat|:count Monaten',
'week_ago' => ':count Woche|:count Wochen',
'day_ago' => ':count Tag|:count Tagen',
'diff_now' => 'Gerade eben',
'diff_yesterday' => 'Gestern',
'diff_tomorrow' => 'Heute',
'diff_before_yesterday' => 'Vorgestern',
'diff_after_tomorrow' => 'Übermorgen',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Ahmed Ali <ajaaibu@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު',
'y' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު',
'month' => '{0}މައްސަރެއް|[1,Inf]:count މަސް',
'm' => '{0}މައްސަރެއް|[1,Inf]:count މަސް',
'week' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ',
'w' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ',
'day' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް',
'd' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް',
'hour' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި',
'h' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި',
'minute' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް',
'min' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް',
'second' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު',
's' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު',
'ago' => ':time ކުރިން',
'from_now' => ':time ފަހުން',
'after' => ':time ފަހުން',
'before' => ':time ކުރި',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/el/date.php
*/
return array(
'year' => '1 χρόνος|:count χρόνια',
'month' => '1 μήνας|:count μήνες',
'week' => '1 εβδομάδα|:count εβδομάδες',
'day' => '1 μέρα|:count μέρες',
'hour' => '1 ώρα|:count ώρες',
'minute' => '1 λεπτό|:count λεπτά',
'second' => '1 δευτερόλεπτο|:count δευτερόλεπτα',
'ago' => 'πρίν απο :time',
'from_now' => 'σε :time απο τώρα',
'after' => ':time μετά',
'before' => ':time πρίν'
'year' => ':count χρόνος|:count χρόνια',
'y' => ':count χρόνος|:count χρόνια',
'month' => ':count μήνας|:count μήνες',
'm' => ':count μήνας|:count μήνες',
'week' => ':count εβδομάδα|:count εβδομάδες',
'w' => ':count εβδομάδα|:count εβδομάδες',
'day' => ':count μέρα|:count μέρες',
'd' => ':count μέρα|:count μέρες',
'hour' => ':count ώρα|:count ώρες',
'h' => ':count ώρα|:count ώρες',
'minute' => ':count λεπτό|:count λεπτά',
'min' => ':count λεπτό|:count λεπτά',
'second' => ':count δευτερόλεπτο|:count δευτερόλεπτα',
's' => ':count δευτερόλεπτο|:count δευτερόλεπτα',
'ago' => 'πριν από :time',
'from_now' => 'σε :time από τώρα',
'after' => ':time μετά',
'before' => ':time πριν',
);

View File

@@ -9,20 +9,32 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 year|:count years',
'month' => '1 month|:count months',
'week' => '1 week|:count weeks',
'day' => '1 day|:count days',
'hour' => '1 hour|:count hours',
'minute' => '1 minute|:count minutes',
'second' => '1 second|:count seconds',
'ago' => ':time ago',
'from_now' => ':time from now',
'after' => ':time after',
'before' => ':time before',
'year' => ':count year|:count years',
'y' => ':countyr|:countyrs',
'month' => ':count month|:count months',
'm' => ':countmo|:countmos',
'week' => ':count week|:count weeks',
'w' => ':countw|:countw',
'day' => ':count day|:count days',
'd' => ':countd|:countd',
'hour' => ':count hour|:count hours',
'h' => ':counth|:counth',
'minute' => ':count minute|:count minutes',
'min' => ':countm|:countm',
'second' => ':count second|:count seconds',
's' => ':counts|:counts',
'ago' => ':time ago',
'from_now' => ':time from now',
'after' => ':time after',
'before' => ':time before',
'diff_now' => 'just now',
'diff_yesterday' => 'yesterday',
'diff_tomorrow' => 'tomorrow',
'diff_before_yesterday' => 'before yesterday',
'diff_after_tomorrow' => 'after tomorrow',
'period_recurrences' => 'once|:count times',
'period_interval' => 'every :interval',
'period_start_date' => 'from :date',
'period_end_date' => 'to :date',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/eo/date.php
*/
return array(
'year' => '1 jaro|:count jaroj',
'month' => '1 monato|:count monatoj',
'week' => '1 semajno|:count semajnoj',
'day' => '1 tago|:count tagoj',
'hour' => '1 horo|:count horoj',
'minute' => '1 minuto|:count minutoj',
'second' => '1 sekundo|:count sekundoj',
'ago' => 'antaŭ :time',
'from_now' => 'je :time',
'after' => ':time poste',
'before' => ':time antaŭe'
'year' => ':count jaro|:count jaroj',
'y' => ':count jaro|:count jaroj',
'month' => ':count monato|:count monatoj',
'm' => ':count monato|:count monatoj',
'week' => ':count semajno|:count semajnoj',
'w' => ':count semajno|:count semajnoj',
'day' => ':count tago|:count tagoj',
'd' => ':count tago|:count tagoj',
'hour' => ':count horo|:count horoj',
'h' => ':count horo|:count horoj',
'minute' => ':count minuto|:count minutoj',
'min' => ':count minuto|:count minutoj',
'second' => ':count sekundo|:count sekundoj',
's' => ':count sekundo|:count sekundoj',
'ago' => 'antaŭ :time',
'from_now' => 'je :time',
'after' => ':time poste',
'before' => ':time antaŭe',
);

View File

@@ -9,20 +9,28 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 año|:count años',
'month' => '1 mes|:count meses',
'week' => '1 semana|:count semanas',
'day' => '1 día|:count días',
'hour' => '1 hora|:count horas',
'minute' => '1 minuto|:count minutos',
'second' => '1 segundo|:count segundos',
'ago' => 'hace :time',
'from_now' => 'dentro de :time',
'after' => ':time después',
'before' => ':time antes',
'year' => ':count año|:count años',
'y' => ':count año|:count años',
'month' => ':count mes|:count meses',
'm' => ':count mes|:count meses',
'week' => ':count semana|:count semanas',
'w' => ':count semana|:count semanas',
'day' => ':count día|:count días',
'd' => ':count día|:count días',
'hour' => ':count hora|:count horas',
'h' => ':count hora|:count horas',
'minute' => ':count minuto|:count minutos',
'min' => ':count minuto|:count minutos',
'second' => ':count segundo|:count segundos',
's' => ':count segundo|:count segundos',
'ago' => 'hace :time',
'from_now' => 'dentro de :time',
'after' => ':time después',
'before' => ':time antes',
'diff_now' => 'ahora mismo',
'diff_yesterday' => 'ayer',
'diff_tomorrow' => 'mañana',
'diff_before_yesterday' => 'anteayer',
'diff_after_tomorrow' => 'pasado mañana',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -6,20 +7,27 @@
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
return array(
'year' => '1 aasta|:count aastat',
'month' => '1 kuu|:count kuud',
'week' => '1 nädal|:count nädalat',
'day' => '1 päev|:count päeva',
'hour' => '1 tund|:count tundi',
'minute' => '1 minut|:count minutit',
'second' => '1 sekund|:count sekundit',
'ago' => ':time tagasi',
'from_now' => ':time pärast',
'after' => ':time pärast',
'before' => ':time enne',
'year' => ':count aasta|:count aastat',
'y' => ':count aasta|:count aastat',
'month' => ':count kuu|:count kuud',
'm' => ':count kuu|:count kuud',
'week' => ':count nädal|:count nädalat',
'w' => ':count nädal|:count nädalat',
'day' => ':count päev|:count päeva',
'd' => ':count päev|:count päeva',
'hour' => ':count tund|:count tundi',
'h' => ':count tund|:count tundi',
'minute' => ':count minut|:count minutit',
'min' => ':count minut|:count minutit',
'second' => ':count sekund|:count sekundit',
's' => ':count sekund|:count sekundit',
'ago' => ':time tagasi',
'from_now' => ':time pärast',
'after' => ':time pärast',
'before' => ':time enne',
'year_from_now' => ':count aasta',
'month_from_now' => ':count kuu',
'week_from_now' => ':count nädala',

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/eu/date.php
*/
return array(
'year' => 'Urte 1|:count urte',
'month' => 'Hile 1|:count hile',
'week' => 'Aste 1|:count aste',
'day' => 'Egun 1|:count egun',
'hour' => 'Ordu 1|:count ordu',
'minute' => 'Minutu 1|:count minutu',
'second' => 'Segundu 1|:count segundu',
'ago' => 'Orain dela :time',
'from_now' => ':time barru',
'after' => ':time geroago',
'before' => ':time lehenago'
'year' => 'Urte 1|:count urte',
'y' => 'Urte 1|:count urte',
'month' => 'Hile 1|:count hile',
'm' => 'Hile 1|:count hile',
'week' => 'Aste 1|:count aste',
'w' => 'Aste 1|:count aste',
'day' => 'Egun 1|:count egun',
'd' => 'Egun 1|:count egun',
'hour' => 'Ordu 1|:count ordu',
'h' => 'Ordu 1|:count ordu',
'minute' => 'Minutu 1|:count minutu',
'min' => 'Minutu 1|:count minutu',
'second' => 'Segundu 1|:count segundu',
's' => 'Segundu 1|:count segundu',
'ago' => 'Orain dela :time',
'from_now' => ':time barru',
'after' => ':time geroago',
'before' => ':time lehenago',
);

View File

@@ -9,21 +9,23 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => ':count سال',
'month' => ':count ماه',
'week' => ':count هفته',
'day' => ':count روز',
'hour' => ':count ساعت',
'minute' => ':count دقیقه',
'second' => ':count ثانیه',
'ago' => ':time پیش',
'from_now' => ':time بعد',
'after' => ':time پیش از',
'before' => ':time پس از',
'year' => ':count سال',
'y' => ':count سال',
'month' => ':count ماه',
'm' => ':count ماه',
'week' => ':count هفته',
'w' => ':count هفته',
'day' => ':count روز',
'd' => ':count روز',
'hour' => ':count ساعت',
'h' => ':count ساعت',
'minute' => ':count دقیقه',
'min' => ':count دقیقه',
'second' => ':count ثانیه',
's' => ':count ثانیه',
'ago' => ':time پیش',
'from_now' => ':time بعد',
'after' => ':time پس از',
'before' => ':time پیش از',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/fi/date.php
*/
return array(
'year' => '1 vuosi|:count vuotta',
'month' => '1 kuukausi|:count kuukautta',
'week' => '1 viikko|:count viikkoa',
'day' => '1 päivä|:count päivää',
'hour' => '1 tunti|:count tuntia',
'minute' => '1 minuutti|:count minuuttia',
'second' => '1 sekunti|:count sekuntia',
'ago' => ':time sitten',
'from_now' => ':time tästä hetkestä',
'after' => ':time sen jälkeen',
'before' => ':time ennen'
'year' => ':count vuosi|:count vuotta',
'y' => ':count vuosi|:count vuotta',
'month' => ':count kuukausi|:count kuukautta',
'm' => ':count kuukausi|:count kuukautta',
'week' => ':count viikko|:count viikkoa',
'w' => ':count viikko|:count viikkoa',
'day' => ':count päivä|:count päivää',
'd' => ':count päivä|:count päivää',
'hour' => ':count tunti|:count tuntia',
'h' => ':count tunti|:count tuntia',
'minute' => ':count minuutti|:count minuuttia',
'min' => ':count minuutti|:count minuuttia',
'second' => ':count sekunti|:count sekuntia',
's' => ':count sekunti|:count sekuntia',
'ago' => ':time sitten',
'from_now' => ':time tästä hetkestä',
'after' => ':time sen jälkeen',
'before' => ':time ennen',
);

View File

@@ -9,20 +9,23 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 ár|:count ár',
'month' => '1 mánaður|:count mánaðir',
'week' => '1 vika|:count vikur',
'day' => '1 dag|:count dagar',
'hour' => '1 tími|:count tímar',
'minute' => '1 minutt|:count minuttir',
'second' => '1 sekund|:count sekundir',
'ago' => ':time síðan',
'from_now' => 'um :time',
'after' => ':time aftaná',
'before' => ':time áðrenn',
'year' => ':count ár|:count ár',
'y' => ':count ár|:count ár',
'month' => ':count mánaður|:count mánaðir',
'm' => ':count mánaður|:count mánaðir',
'week' => ':count vika|:count vikur',
'w' => ':count vika|:count vikur',
'day' => ':count dag|:count dagar',
'd' => ':count dag|:count dagar',
'hour' => ':count tími|:count tímar',
'h' => ':count tími|:count tímar',
'minute' => ':count minutt|:count minuttir',
'min' => ':count minutt|:count minuttir',
'second' => ':count sekund|:count sekundir',
's' => ':count sekund|:count sekundir',
'ago' => ':time síðan',
'from_now' => 'um :time',
'after' => ':time aftaná',
'before' => ':time áðrenn',
);

View File

@@ -9,20 +9,32 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 an|:count ans',
'month' => ':count mois',
'week' => '1 semaine|:count semaines',
'day' => '1 jour|:count jours',
'hour' => '1 heure|:count heures',
'minute' => '1 minute|:count minutes',
'second' => '1 seconde|:count secondes',
'ago' => 'il y a :time',
'from_now' => 'dans :time',
'after' => ':time après',
'before' => ':time avant',
'year' => ':count an|:count ans',
'y' => ':count an|:count ans',
'month' => ':count mois',
'm' => ':count mois',
'week' => ':count semaine|:count semaines',
'w' => ':count sem.',
'day' => ':count jour|:count jours',
'd' => ':count j.',
'hour' => ':count heure|:count heures',
'h' => ':count h.',
'minute' => ':count minute|:count minutes',
'min' => ':count min.',
'second' => ':count seconde|:count secondes',
's' => ':count sec.',
'ago' => 'il y a :time',
'from_now' => 'dans :time',
'after' => ':time après',
'before' => ':time avant',
'diff_now' => "à l'instant",
'diff_yesterday' => 'hier',
'diff_tomorrow' => 'demain',
'diff_before_yesterday' => 'avant-hier',
'diff_after_tomorrow' => 'après-demain',
'period_recurrences' => ':count fois',
'period_interval' => 'tous les :interval',
'period_start_date' => 'de :date',
'period_end_date' => 'à :date',
);

View File

@@ -0,0 +1,24 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count ano|:count anos',
'month' => ':count mes|:count meses',
'week' => ':count semana|:count semanas',
'day' => ':count día|:count días',
'hour' => ':count hora|:count horas',
'minute' => ':count minuto|:count minutos',
'second' => ':count segundo|:count segundos',
'ago' => 'fai :time',
'from_now' => 'dentro de :time',
'after' => ':time despois',
'before' => ':time antes',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count વર્ષ|:count વર્ષો',
'y' => ':countવર્ષ|:countવર્ષો',
'month' => ':count મહિનો|:count મહિના',
'm' => ':countમહિનો|:countમહિના',
'week' => ':count અઠવાડિયું|:count અઠવાડિયા',
'w' => ':countઅઠ.|:countઅઠ.',
'day' => ':count દિવસ|:count દિવસો',
'd' => ':countદિ.|:countદિ.',
'hour' => ':count કલાક|:count કલાકો',
'h' => ':countક.|:countક.',
'minute' => ':count મિનિટ|:count મિનિટ',
'min' => ':countમિ.|:countમિ.',
'second' => ':count સેકેન્ડ|:count સેકેન્ડ',
's' => ':countસે.|:countસે.',
'ago' => ':time પહેલા',
'from_now' => ':time અત્યારથી',
'after' => ':time પછી',
'before' => ':time પહેલા',
);

View File

@@ -9,20 +9,23 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => 'שנה|{2}שנתיים|:count שנים',
'month' => 'חודש|{2}חודשיים|:count חודשים',
'week' => 'שבוע|{2}שבועיים|:count שבועות',
'day' => 'יום|{2}יומיים|:count ימים',
'hour' => 'שעה|{2}שעתיים|:count שעות',
'minute' => 'דקה|{2}דקותיים|:count דקות',
'second' => 'שניה|:count שניות',
'ago' => 'לפני :time',
'from_now' => 'בעוד :time',
'after' => 'אחרי :time',
'before' => 'לפני :time',
'year' => 'שנה|{2}שנתיים|:count שנים',
'y' => 'שנה|{2}שנתיים|:count שנים',
'month' => 'חודש|{2}חודשיים|:count חודשים',
'm' => 'חודש|{2}חודשיים|:count חודשים',
'week' => בוע|{2}שבועיים|:count שבועות',
'w' => 'שבוע|{2}שבועיים|:count שבועות',
'day' => 'יום|{2}יומיים|:count ימים',
'd' => 'יום|{2}יומיים|:count ימים',
'hour' => 'שעה|{2}שעתיים|:count שעות',
'h' => 'שעה|{2}שעתיים|:count שעות',
'minute' => 'דקה|{2}דקותיים|:count דקות',
'min' => 'דקה|{2}דקותיים|:count דקות',
'second' => 'שניה|:count שניות',
's' => 'שניה|:count שניות',
'ago' => 'לפני :time',
'from_now' => 'בעוד :time',
'after' => 'אחרי :time',
'before' => 'לפני :time',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '1 वर्ष|:count वर्षों',
'y' => '1 वर्ष|:count वर्षों',
'month' => '1 माह|:count महीने',
'm' => '1 माह|:count महीने',
'week' => '1 सप्ताह|:count सप्ताह',
'w' => '1 सप्ताह|:count सप्ताह',
'day' => '1 दिन|:count दिनों',
'd' => '1 दिन|:count दिनों',
'hour' => '1 घंटा|:count घंटे',
'h' => '1 घंटा|:count घंटे',
'minute' => '1 मिनट|:count मिनटों',
'min' => '1 मिनट|:count मिनटों',
'second' => '1 सेकंड|:count सेकंड',
's' => '1 सेकंड|:count सेकंड',
'ago' => ':time पूर्व',
'from_now' => ':time से',
'after' => ':time के बाद',
'before' => ':time के पहले',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/hr/date.php
*/
return array(
'year' => ':count godinu|:count godine|:count godina',
'month' => ':count mjesec|:count mjeseca|:count mjeseci',
'week' => ':count tjedan|:count tjedna|:count tjedana',
'day' => ':count dan|:count dana|:count dana',
'hour' => ':count sat|:count sata|:count sati',
'minute' => ':count minutu|:count minute |:count minuta',
'second' => ':count sekundu|:count sekunde|:count sekundi',
'ago' => 'prije :time',
'from_now' => 'za :time',
'after' => 'za :time',
'before' => 'prije :time'
'year' => ':count godinu|:count godine|:count godina',
'y' => ':count godinu|:count godine|:count godina',
'month' => ':count mjesec|:count mjeseca|:count mjeseci',
'm' => ':count mjesec|:count mjeseca|:count mjeseci',
'week' => ':count tjedan|:count tjedna|:count tjedana',
'w' => ':count tjedan|:count tjedna|:count tjedana',
'day' => ':count dan|:count dana|:count dana',
'd' => ':count dan|:count dana|:count dana',
'hour' => ':count sat|:count sata|:count sati',
'h' => ':count sat|:count sata|:count sati',
'minute' => ':count minutu|:count minute |:count minuta',
'min' => ':count minutu|:count minute |:count minuta',
'second' => ':count sekundu|:count sekunde|:count sekundi',
's' => ':count sekundu|:count sekunde|:count sekundi',
'ago' => 'prije :time',
'from_now' => 'za :time',
'after' => 'za :time',
'before' => 'prije :time',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,45 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/hu/date.php
*/
return array(
'year' => '1 évvel|:count évvel',
'month' => '1 hónappal|:count hónappal',
'week' => '1 héttel|:count héttel',
'day' => '1 nappal|:count nappal',
'hour' => '1 órával|:count órával',
'minute' => '1 perccel|:count perccel',
'second' => '1 másodperccel|:count másodperccel',
'ago' => ':time korábban',
'from_now' => ':time később',
'after' => ':time később',
'before' => ':time korábban'
'year' => ':count év',
'y' => ':count év',
'month' => ':count hónap',
'm' => ':count nap',
'week' => ':count hét',
'w' => ':count hét',
'day' => ':count nap',
'd' => ':count nap',
'hour' => ':count óra',
'h' => ':count óra',
'minute' => ':count perc',
'min' => ':count perc',
'second' => ':count másodperc',
's' => ':count másodperc',
'ago' => ':time',
'from_now' => ':time múlva',
'after' => ':time később',
'before' => ':time korábban',
'year_ago' => ':count éve',
'month_ago' => ':count hónapja',
'week_ago' => ':count hete',
'day_ago' => ':count napja',
'hour_ago' => ':count órája',
'minute_ago' => ':count perce',
'second_ago' => ':count másodperce',
'year_after' => ':count évvel',
'month_after' => ':count hónappal',
'week_after' => ':count héttel',
'day_after' => ':count nappal',
'hour_after' => ':count órával',
'minute_after' => ':count perccel',
'second_after' => ':count másodperccel',
'year_before' => ':count évvel',
'month_before' => ':count hónappal',
'week_before' => ':count héttel',
'day_before' => ':count nappal',
'hour_before' => ':count órával',
'minute_before' => ':count perccel',
'second_before' => ':count másodperccel',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count տարի',
'y' => ':countտ',
'month' => ':count ամիս',
'm' => ':countամ',
'week' => ':count շաբաթ',
'w' => ':countշ',
'day' => ':count օր',
'd' => ':countօր',
'hour' => ':count ժամ',
'h' => ':countժ',
'minute' => ':count րոպե',
'min' => ':countր',
'second' => ':count վարկյան',
's' => ':countվրկ',
'ago' => ':time առաջ',
'from_now' => ':time ներկա պահից',
'after' => ':time հետո',
'before' => ':time առաջ',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/id/date.php
*/
return array(
'year' => ':count tahun',
'month' => ':count bulan',
'week' => ':count minggu',
'day' => ':count hari',
'hour' => ':count jam',
'minute' => ':count menit',
'second' => ':count detik',
'ago' => ':time yang lalu',
'from_now' => ':time dari sekarang',
'after' => ':time setelah',
'before' => ':time sebelum'
'year' => ':count tahun',
'y' => ':count tahun',
'month' => ':count bulan',
'm' => ':count bulan',
'week' => ':count minggu',
'w' => ':count minggu',
'day' => ':count hari',
'd' => ':count hari',
'hour' => ':count jam',
'h' => ':count jam',
'minute' => ':count menit',
'min' => ':count menit',
'second' => ':count detik',
's' => ':count detik',
'ago' => ':time yang lalu',
'from_now' => ':time dari sekarang',
'after' => ':time setelah',
'before' => ':time sebelum',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '1 ár|:count ár',
'y' => '1 ár|:count ár',
'month' => '1 mánuður|:count mánuðir',
'm' => '1 mánuður|:count mánuðir',
'week' => '1 vika|:count vikur',
'w' => '1 vika|:count vikur',
'day' => '1 dagur|:count dagar',
'd' => '1 dagur|:count dagar',
'hour' => '1 klukkutími|:count klukkutímar',
'h' => '1 klukkutími|:count klukkutímar',
'minute' => '1 mínúta|:count mínútur',
'min' => '1 mínúta|:count mínútur',
'second' => '1 sekúnda|:count sekúndur',
's' => '1 sekúnda|:count sekúndur',
'ago' => ':time síðan',
'from_now' => ':time síðan',
'after' => ':time eftir',
'before' => ':time fyrir',
);

View File

@@ -9,20 +9,28 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 anno|:count anni',
'month' => '1 mese|:count mesi',
'week' => '1 settimana|:count settimane',
'day' => '1 giorno|:count giorni',
'hour' => '1 ora|:count ore',
'minute' => '1 minuto|:count minuti',
'second' => '1 secondo|:count secondi',
'ago' => ':time fa',
'from_now' => ':time da adesso',
'after' => ':time dopo',
'before' => ':time prima',
'year' => ':count anno|:count anni',
'y' => ':count anno|:count anni',
'month' => ':count mese|:count mesi',
'm' => ':count mese|:count mesi',
'week' => ':count settimana|:count settimane',
'w' => ':count settimana|:count settimane',
'day' => ':count giorno|:count giorni',
'd' => ':count giorno|:count giorni',
'hour' => ':count ora|:count ore',
'h' => ':count ora|:count ore',
'minute' => ':count minuto|:count minuti',
'min' => ':count minuto|:count minuti',
'second' => ':count secondo|:count secondi',
's' => ':count secondo|:count secondi',
'ago' => ':time fa',
'from_now' => 'tra :time',
'after' => ':time dopo',
'before' => ':time prima',
'diff_now' => 'proprio ora',
'diff_yesterday' => 'ieri',
'diff_tomorrow' => 'domani',
'diff_before_yesterday' => "l'altro ieri",
'diff_after_tomorrow' => 'dopodomani',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ja/date.php
*/
return array(
'year' => ':count 年',
'month' => ':count ヶ月',
'week' => ':count 週間',
'day' => ':count',
'hour' => ':count間',
'minute' => ':count',
'second' => ':count',
'ago' => ':time 前',
'from_now' => '今から :time',
'after' => ':time 後',
'before' => ':time 前'
'year' => ':count年',
'y' => ':count',
'month' => ':countヶ月',
'm' => ':countヶ月',
'week' => ':count間',
'w' => ':count週間',
'day' => ':count',
'd' => ':count日',
'hour' => ':count時間',
'h' => ':count時間',
'minute' => ':count分',
'min' => ':count分',
'second' => ':count秒',
's' => ':count秒',
'ago' => ':time前',
'from_now' => '今から:time',
'after' => ':time後',
'before' => ':time前',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count წლის',
'y' => ':count წლის',
'month' => ':count თვის',
'm' => ':count თვის',
'week' => ':count კვირის',
'w' => ':count კვირის',
'day' => ':count დღის',
'd' => ':count დღის',
'hour' => ':count საათის',
'h' => ':count საათის',
'minute' => ':count წუთის',
'min' => ':count წუთის',
'second' => ':count წამის',
's' => ':count წამის',
'ago' => ':time უკან',
'from_now' => ':time შემდეგ',
'after' => ':time შემდეგ',
'before' => ':time უკან',
);

View File

@@ -0,0 +1,29 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count жыл',
'y' => ':count жыл',
'month' => ':count ай',
'm' => ':count ай',
'week' => ':count апта',
'w' => ':count апта',
'day' => ':count күн',
'd' => ':count күн',
'hour' => ':count сағат',
'h' => ':count сағат',
'minute' => ':count минут',
'min' => ':count минут',
'second' => ':count секунд',
's' => ':count секунд',
'ago' => ':time бұрын',
'from_now' => ':time кейін',
'after' => ':time кейін',
'before' => ':time бұрын',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count ឆ្នាំ',
'y' => ':count ឆ្នាំ',
'month' => ':count ខែ',
'm' => ':count ខែ',
'week' => ':count សប្ដាហ៍',
'w' => ':count សប្ដាហ៍',
'day' => ':count ថ្ងៃ',
'd' => ':count ថ្ងៃ',
'hour' => ':count ម៉ោង',
'h' => ':count ម៉ោង',
'minute' => ':count នាទី',
'min' => ':count នាទី',
'second' => ':count វិនាទី',
's' => ':count វិនាទី',
'ago' => ':timeមុន',
'from_now' => ':timeពីឥឡូវ',
'after' => 'នៅ​ក្រោយ :time',
'before' => 'នៅ​មុន :time',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/cs/date.php
*/
return array(
'year' => ':count 년',
'month' => ':count 개월',
'week' => ':count 주일',
'day' => ':count ',
'hour' => ':count 시간',
'minute' => ':count ',
'second' => ':count ',
'ago' => ':time 전',
'from_now' => ':time 후',
'after' => ':time 뒤',
'before' => ':time 앞',
'year' => ':count 년',
'y' => ':count ',
'month' => ':count 개월',
'm' => ':count 개월',
'week' => ':count 주일',
'w' => ':count 주일',
'day' => ':count ',
'd' => ':count 일',
'hour' => ':count 시간',
'h' => ':count 시간',
'minute' => ':count 분',
'min' => ':count 분',
'second' => ':count 초',
's' => ':count 초',
'ago' => ':time 전',
'from_now' => ':time 후',
'after' => ':time 이후',
'before' => ':time 이전',
);

View File

@@ -9,21 +9,30 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 metus|:count metus|:count metų',
'month' => '1 menesį|:count menesius|:count menesių',
'week' => '1 savaitę|:count savaites|:count savaičių',
'day' => '1 dieną|:count dienas|:count dienų',
'hour' => '1 valandą|:count valandas|:count valandų',
'minute' => '1 minutę|:count minutes|:count minučių',
'second' => '1 sekundę|:count sekundes|:count sekundžių',
'ago' => 'prieš :time',
'from_now' => 'už :time',
'after' => 'po :time',
'before' => ':time nuo dabar',
'year' => ':count metus|:count metus|:count metų',
'y' => ':count metus|:count metus|:count metų',
'month' => ':count mėnesį|:count mėnesius|:count mėnesių',
'm' => ':count mėnesį|:count mėnesius|:count mėnesių',
'week' => ':count savaitę|:count savaites|:count savaičių',
'w' => ':count savaitę|:count savaites|:count savaičių',
'day' => ':count dieną|:count dienas|:count dienų',
'd' => ':count dieną|:count dienas|:count dienų',
'hour' => ':count valandą|:count valandas|:count valandų',
'h' => ':count valandą|:count valandas|:count valandų',
'minute' => ':count minutę|:count minutes|:count minučių',
'min' => ':count minutę|:count minutes|:count minučių',
'second' => ':count sekundę|:count sekundes|:count sekundžių',
's' => ':count sekundę|:count sekundes|:count sekundžių',
'second_from_now' => ':count sekundės|:count sekundžių|:count sekundžių',
'minute_from_now' => ':count minutės|:count minučių|:count minučių',
'hour_from_now' => ':count valandos|:count valandų|:count valandų',
'day_from_now' => ':count dienos|:count dienų|:count dienų',
'week_from_now' => ':count savaitės|:count savaičių|:count savaičių',
'month_from_now' => ':count mėnesio|:count mėnesių|:count mėnesių',
'year_from_now' => ':count metų',
'ago' => 'prieš :time',
'from_now' => 'už :time',
'after' => 'po :time',
'before' => ':time nuo dabar',
);

View File

@@ -1,43 +1,47 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Viesturs Kavacs WWW: kavacky.lv
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '0 gadiem|:count gada|:count gadiem',
'month' => '0 mēnešiem|:count mēneša|:count mēnešiem',
'week' => '0 nedēļām|:count nedēļas|:count nedēļām',
'day' => '0 dienām|:count dienas|:count dienām',
'hour' => '0 stundām|:count stundas|:count stundām',
'minute' => '0 minūtēm|:count minūtes|:count minūtēm',
'second' => '0 sekundēm|:count sekundes|:count sekundēm',
'ago' => 'pirms :time',
'from_now' => 'pēc :time',
'after' => ':time vēlāk',
'before' => ':time pirms',
'year' => '0 gadiem|:count gada|:count gadiem',
'y' => '0 gadiem|:count gada|:count gadiem',
'month' => '0 mēnešiem|:count mēneša|:count mēnešiem',
'm' => '0 mēnešiem|:count mēneša|:count mēnešiem',
'week' => '0 nedēļām|:count nedēļas|:count nedēļām',
'w' => '0 nedēļām|:count nedēļas|:count nedēļām',
'day' => '0 dienām|:count dienas|:count dienām',
'd' => '0 dienām|:count dienas|:count dienām',
'hour' => '0 stundām|:count stundas|:count stundām',
'h' => '0 stundām|:count stundas|:count stundām',
'minute' => '0 minūtēm|:count minūtes|:count minūtēm',
'min' => '0 minūtēm|:count minūtes|:count minūtēm',
'second' => '0 sekundēm|:count sekundes|:count sekundēm',
's' => '0 sekundēm|:count sekundes|:count sekundēm',
'ago' => 'pirms :time',
'from_now' => 'pēc :time',
'after' => ':time vēlāk',
'before' => ':time pirms',
'year_after' => '0 gadus|:count gadu|:count gadus',
'month_after' => '0 mēnešus|:count mēnesi|:count mēnešus',
'week_after' => '0 nedēļas|:count nedēļu|:count nedēļas',
'day_after' => '0 dienas|:count dienu|:count dienas',
'hour_after' => '0 stundas|:count stundu|:count stundas',
'minute_after' => '0 minūtes|:count minūti|:count minūtes',
'second_after' => '0 sekundes|:count sekundi|:count sekundes',
'year_after' => '0 gadus|:count gadu|:count gadus',
'month_after' => '0 mēnešus|:count mēnesi|:count mēnešus',
'week_after' => '0 nedēļas|:count nedēļu|:count nedēļas',
'day_after' => '0 dienas|:count dienu|:count dienas',
'hour_after' => '0 stundas|:count stundu|:count stundas',
'minute_after' => '0 minūtes|:count minūti|:count minūtes',
'second_after' => '0 sekundes|:count sekundi|:count sekundes',
'year_before' => '0 gadus|:count gadu|:count gadus',
'month_before' => '0 mēnešus|:count mēnesi|:count mēnešus',
'week_before' => '0 nedēļas|:count nedēļu|:count nedēļas',
'day_before' => '0 dienas|:count dienu|:count dienas',
'hour_before' => '0 stundas|:count stundu|:count stundas',
'year_before' => '0 gadus|:count gadu|:count gadus',
'month_before' => '0 mēnešus|:count mēnesi|:count mēnešus',
'week_before' => '0 nedēļas|:count nedēļu|:count nedēļas',
'day_before' => '0 dienas|:count dienu|:count dienas',
'hour_before' => '0 stundas|:count stundu|:count stundas',
'minute_before' => '0 minūtes|:count minūti|:count minūtes',
'second_before' => '0 sekundes|:count sekundi|:count sekundes',
);

View File

@@ -0,0 +1,24 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count година|:count години',
'month' => ':count месец|:count месеци',
'week' => ':count седмица|:count седмици',
'day' => ':count ден|:count дена',
'hour' => ':count час|:count часа',
'minute' => ':count минута|:count минути',
'second' => ':count секунда|:count секунди',
'ago' => 'пред :time',
'from_now' => ':time од сега',
'after' => 'по :time',
'before' => 'пред :time',
);

View File

@@ -0,0 +1,62 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @translator Batmandakh Erdenebileg <batmandakh.e@icloud.com>
*/
return array(
'year' => ':count жил',
'y' => ':count жил',
'month' => ':count сар',
'm' => ':count сар',
'week' => ':count долоо хоног',
'w' => ':count долоо хоног',
'day' => ':count өдөр',
'd' => ':count өдөр',
'hour' => ':count цаг',
'h' => ':countц',
'minute' => ':count минут',
'min' => ':countм',
'second' => ':count секунд',
's' => ':countс',
'ago' => ':timeн өмнө',
'year_ago' => ':count жилий',
'month_ago' => ':count сары',
'day_ago' => ':count хоногий',
'hour_ago' => ':count цагий',
'minute_ago' => ':count минуты',
'second_ago' => ':count секунды',
'from_now' => 'одоогоос :time',
'year_from_now' => ':count жилийн дараа',
'month_from_now' => ':count сарын дараа',
'day_from_now' => ':count хоногийн дараа',
'hour_from_now' => ':count цагийн дараа',
'minute_from_now' => ':count минутын дараа',
'second_from_now' => ':count секундын дараа',
// Does it required to make translation for before, after as follows? hmm, I think we've made it with ago and from now keywords already. Anyway, I've included it just in case of undesired action...
'after' => ':timeн дараа',
'year_after' => ':count жилий',
'month_after' => ':count сары',
'day_after' => ':count хоногий',
'hour_after' => ':count цагий',
'minute_after' => ':count минуты',
'second_after' => ':count секунды',
'before' => ':timeн өмнө',
'year_before' => ':count жилий',
'month_before' => ':count сары',
'day_before' => ':count хоногий',
'hour_before' => ':count цагий',
'minute_before' => ':count минуты',
'second_before' => ':count секунды',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,20 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => ':count tahun',
'month' => ':count bulan',
'week' => ':count minggu',
'day' => ':count hari',
'hour' => ':count jam',
'minute' => ':count minit',
'second' => ':count saat',
'ago' => ':time yang lalu',
'from_now' => ':time dari sekarang',
'after' => ':time selepas',
'before' => ':time sebelum',
'year' => ':count tahun',
'y' => ':count tahun',
'month' => ':count bulan',
'm' => ':count bulan',
'week' => ':count minggu',
'w' => ':count minggu',
'day' => ':count hari',
'd' => ':count hari',
'hour' => ':count jam',
'h' => ':count jam',
'minute' => ':count minit',
'min' => ':count minit',
'second' => ':count saat',
's' => ':count saat',
'ago' => ':time yang lalu',
'from_now' => ':time dari sekarang',
'after' => ':time selepas',
'before' => ':time sebelum',
);

View File

@@ -0,0 +1,37 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count နှစ်|:count နှစ်',
'y' => ':count နှစ်|:count နှစ်',
'month' => ':count လ|:count လ',
'm' => ':count လ|:count လ',
'week' => ':count ပတ်|:count ပတ်',
'w' => ':count ပတ်|:count ပတ်',
'day' => ':count ရက်|:count ရက်',
'd' => ':count ရက်|:count ရက်',
'hour' => ':count နာရီ|:count နာရီ',
'h' => ':count နာရီ|:count နာရီ',
'minute' => ':count မိနစ်|:count မိနစ်',
'min' => ':count မိနစ်|:count မိနစ်',
'second' => ':count စက္ကန့်|:count စက္ကန့်',
's' => ':count စက္ကန့်|:count စက္ကန့်',
'ago' => 'လွန်ခဲ့သော :time က',
'from_now' => 'ယခုမှစ၍နောက် :time အကြာ',
'after' => ':time ကြာပြီးနောက်',
'before' => ':time မတိုင်ခင်',
'diff_now' => 'အခုလေးတင်',
'diff_yesterday' => 'မနေ့က',
'diff_tomorrow' => 'မနက်ဖြန်',
'diff_before_yesterday' => 'တမြန်နေ့က',
'diff_after_tomorrow' => 'တဘက်ခါ',
'period_recurrences' => ':count ကြိမ်',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count वर्ष',
'y' => ':count वर्ष',
'month' => ':count महिना',
'm' => ':count महिना',
'week' => ':count हप्ता',
'w' => ':count हप्ता',
'day' => ':count दिन',
'd' => ':count दिन',
'hour' => ':count घण्टा',
'h' => ':count घण्टा',
'minute' => ':count मिनेट',
'min' => ':count मिनेट',
'second' => ':count सेकेण्ड',
's' => ':count सेकेण्ड',
'ago' => ':time पहिले',
'from_now' => ':time देखि',
'after' => ':time पछि',
'before' => ':time अघि',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,20 +8,29 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 jaar|:count jaren',
'month' => '1 maand|:count maanden',
'week' => '1 week|:count weken',
'day' => '1 dag|:count dagen',
'hour' => ':count uur',
'minute' => '1 minuut|:count minuten',
'second' => '1 seconde|:count seconden',
'ago' => ':time geleden',
'from_now' => 'over :time',
'after' => ':time later',
'before' => ':time eerder',
'year' => ':count jaar',
'y' => ':count jaar',
'month' => ':count maand|:count maanden',
'm' => ':count maand|:count maanden',
'week' => ':count week|:count weken',
'w' => ':count week|:count weken',
'day' => ':count dag|:count dagen',
'd' => ':count dag|:count dagen',
'hour' => ':count uur',
'h' => ':count uur',
'minute' => ':count minuut|:count minuten',
'min' => ':count minuut|:count minuten',
'second' => ':count seconde|:count seconden',
's' => ':count seconde|:count seconden',
'ago' => ':time geleden',
'from_now' => 'over :time',
'after' => ':time later',
'before' => ':time eerder',
'diff_now' => 'nu',
'diff_yesterday' => 'gisteren',
'diff_tomorrow' => 'morgen',
'diff_after_tomorrow' => 'overmorgen',
'diff_before_yesterday' => 'eergisteren',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,29 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/no/date.php
*/
return array(
'year' => '1 år|:count år',
'month' => '1 måned|:count måneder',
'week' => '1 uke|:count uker',
'day' => '1 dag|:count dager',
'hour' => '1 time|:count timer',
'minute' => '1 minutt|:count minutter',
'second' => '1 sekund|:count sekunder',
'ago' => ':time siden',
'from_now' => 'om :time',
'after' => ':time etter',
'before' => ':time før'
'year' => ':count år|:count år',
'y' => ':count år|:count år',
'month' => ':count måned|:count måneder',
'm' => ':count måned|:count måneder',
'week' => ':count uke|:count uker',
'w' => ':count uke|:count uker',
'day' => ':count dag|:count dager',
'd' => ':count dag|:count dager',
'hour' => ':count time|:count timer',
'h' => ':count time|:count timer',
'minute' => ':count minutt|:count minutter',
'min' => ':count minutt|:count minutter',
'second' => ':count sekund|:count sekunder',
's' => ':count sekund|:count sekunder',
'ago' => ':time siden',
'from_now' => 'om :time',
'after' => ':time etter',
'before' => ':time før',
'diff_now' => 'akkurat nå',
'diff_yesterday' => 'i går',
'diff_tomorrow' => 'i morgen',
'diff_before_yesterday' => 'i forgårs',
'diff_after_tomorrow' => 'i overmorgen',
);

View File

@@ -0,0 +1,44 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
\Symfony\Component\Translation\PluralizationRules::set(function ($number) {
return $number == 1 ? 0 : 1;
}, 'oc');
return array(
'year' => ':count an|:count ans',
'y' => ':count an|:count ans',
'month' => ':count mes|:count meses',
'm' => ':count mes|:count meses',
'week' => ':count setmana|:count setmanas',
'w' => ':count setmana|:count setmanas',
'day' => ':count jorn|:count jorns',
'd' => ':count jorn|:count jorns',
'hour' => ':count ora|:count oras',
'h' => ':count ora|:count oras',
'minute' => ':count minuta|:count minutas',
'min' => ':count minuta|:count minutas',
'second' => ':count segonda|:count segondas',
's' => ':count segonda|:count segondas',
'ago' => 'fa :time',
'from_now' => 'dins :time',
'after' => ':time aprèp',
'before' => ':time abans',
'diff_now' => 'ara meteis',
'diff_yesterday' => 'ièr',
'diff_tomorrow' => 'deman',
'diff_before_yesterday' => 'ièr delà',
'diff_after_tomorrow' => 'deman passat',
'period_recurrences' => ':count còp|:count còps',
'period_interval' => 'cada :interval',
'period_start_date' => 'de :date',
'period_end_date' => 'fins a :date',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,29 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/pl/date.php
*/
return array(
'year' => '1 rok|:count lata|:count lat',
'month' => '1 miesiąc|:count miesiące|:count miesięcy',
'week' => '1 tydzień|:count tygodnie|:count tygodni',
'day' => '1 dzień|:count dni|:count dni',
'hour' => '1 godzina|:count godziny|:count godzin',
'minute' => '1 minuta|:count minuty|:count minut',
'second' => '1 sekunda|:count sekundy|:count sekund',
'ago' => ':time temu',
'from_now' => ':time od teraz',
'after' => ':time przed',
'before' => ':time po'
'year' => ':count rok|:count lata|:count lat',
'y' => ':countr|:countl',
'month' => ':count miesiąc|:count miesiące|:count miesięcy',
'm' => ':countmies',
'week' => ':count tydzi|:count tygodnie|:count tygodni',
'w' => ':counttyg',
'day' => ':count dzień|:count dni|:count dni',
'd' => ':countd',
'hour' => ':count godzina|:count godziny|:count godzin',
'h' => ':countg',
'minute' => ':count minuta|:count minuty|:count minut',
'min' => ':countm',
'second' => ':count sekunda|:count sekundy|:count sekund',
's' => ':counts',
'ago' => ':time temu',
'from_now' => ':time od teraz',
'after' => ':time po',
'before' => ':time przed',
'diff_now' => 'przed chwilą',
'diff_yesterday' => 'wczoraj',
'diff_tomorrow' => 'jutro',
'diff_before_yesterday' => 'przedwczoraj',
'diff_after_tomorrow' => 'pojutrze',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count کال|:count کاله',
'y' => ':countکال|:countکاله',
'month' => ':count مياشت|:count مياشتي',
'm' => ':countمياشت|:countمياشتي',
'week' => ':count اونۍ|:count اونۍ',
'w' => ':countاونۍ|:countاونۍ',
'day' => ':count ورځ|:count ورځي',
'd' => ':countورځ|:countورځي',
'hour' => ':count ساعت|:count ساعته',
'h' => ':countساعت|:countساعته',
'minute' => ':count دقيقه|:count دقيقې',
'min' => ':countدقيقه|:countدقيقې',
'second' => ':count ثانيه|:count ثانيې',
's' => ':countثانيه|:countثانيې',
'ago' => ':time دمخه',
'from_now' => ':time له اوس څخه',
'after' => ':time وروسته',
'before' => ':time دمخه',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/pt/date.php
*/
return array(
'year' => '1 ano|:count anos',
'month' => '1 mês|:count meses',
'week' => '1 semana|:count semanas',
'day' => '1 dia|:count dias',
'hour' => '1 hora|:count horas',
'minute' => '1 minuto|:count minutos',
'second' => '1 segundo|:count segundos',
'ago' => ':time atrás',
'from_now' => 'em :time',
'after' => ':time depois',
'before' => ':time antes'
'year' => ':count ano|:count anos',
'y' => ':count ano|:count anos',
'month' => ':count mês|:count meses',
'm' => ':count mês|:count meses',
'week' => ':count semana|:count semanas',
'w' => ':count semana|:count semanas',
'day' => ':count dia|:count dias',
'd' => ':count dia|:count dias',
'hour' => ':count hora|:count horas',
'h' => ':count hora|:count horas',
'minute' => ':count minuto|:count minutos',
'min' => ':count minuto|:count minutos',
'second' => ':count segundo|:count segundos',
's' => ':count segundo|:count segundos',
'ago' => ':time atrás',
'from_now' => 'em :time',
'after' => ':time depois',
'before' => ':time antes',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,20 +8,33 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 ano|:count anos',
'month' => '1 mês|:count meses',
'week' => '1 semana|:count semanas',
'day' => '1 dia|:count dias',
'hour' => '1 hora|:count horas',
'minute' => '1 minuto|:count minutos',
'second' => '1 segundo|:count segundos',
'ago' => 'há :time',
'from_now' => 'dentro de :time',
'after' => 'após :time',
'before' => ':time atrás',
'year' => ':count ano|:count anos',
'y' => ':counta|:counta',
'month' => ':count mês|:count meses',
'm' => ':countm|:countm',
'week' => ':count semana|:count semanas',
'w' => ':countsem|:countsem',
'day' => ':count dia|:count dias',
'd' => ':countd|:countd',
'hour' => ':count hora|:count horas',
'h' => ':counth|:counth',
'minute' => ':count minuto|:count minutos',
'min' => ':countmin|:countmin',
'second' => ':count segundo|:count segundos',
's' => ':counts|:counts',
'ago' => 'há :time',
'from_now' => 'em :time',
'after' => 'após :time',
'before' => ':time atrás',
'diff_now' => 'agora',
'diff_yesterday' => 'ontem',
'diff_tomorrow' => 'amanhã',
'diff_before_yesterday' => 'anteontem',
'diff_after_tomorrow' => 'depois de amanhã',
'period_recurrences' => 'uma|:count vez',
'period_interval' => 'toda :interval',
'period_start_date' => 'de :date',
'period_end_date' => 'até :date',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ro/date.php
*/
return array(
'year' => 'un an|:count ani|:count ani',
'month' => 'o lună|:count luni|:count luni',
'week' => 'o săptămână|:count săptămâni|:count săptămâni',
'day' => 'o zi|:count zile|:count zile',
'hour' => 'o oră|:count ore|:count ore',
'minute' => 'un minut|:count minute|:count minute',
'second' => 'o secundă|:count secunde|:count secunde',
'ago' => 'acum :time',
'from_now' => ':time de acum',
'after' => 'peste :time',
'before' => 'acum :time'
'year' => 'un an|:count ani|:count ani',
'y' => 'un an|:count ani|:count ani',
'month' => 'o lună|:count luni|:count luni',
'm' => 'o lună|:count luni|:count luni',
'week' => 'o săptămână|:count săptămâni|:count săptămâni',
'w' => 'o săptămână|:count săptămâni|:count săptămâni',
'day' => 'o zi|:count zile|:count zile',
'd' => 'o zi|:count zile|:count zile',
'hour' => 'o oră|:count ore|:count ore',
'h' => 'o oră|:count ore|:count ore',
'minute' => 'un minut|:count minute|:count minute',
'min' => 'un minut|:count minute|:count minute',
'second' => 'o secundă|:count secunde|:count secunde',
's' => 'o secundă|:count secunde|:count secunde',
'ago' => 'acum :time',
'from_now' => ':time de acum',
'after' => 'peste :time',
'before' => 'acum :time',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ru/date.php
*/
return array(
'year' => ':count год|:count года|:count лет',
'month' => ':count месяц|:count месяца|:count месяцев',
'week' => ':count неделю|:count недели|:count недель',
'day' => ':count день|:count дня|:count дней',
'hour' => ':count час|:count часа|:count часов',
'minute' => ':count минуту|:count минуты|:count минут',
'second' => ':count секунду|:count секунды|:count секунд',
'ago' => ':time назад',
'from_now' => 'через :time',
'after' => ':time после',
'before' => ':time до'
'year' => ':count год|:count года|:count лет',
'y' => ':count год|:count года|:count лет',
'month' => ':count месяц|:count месяца|:count месяцев',
'm' => ':count месяц|:count месяца|:count месяцев',
'week' => ':count неделю|:count недели|:count недель',
'w' => ':count неделю|:count недели|:count недель',
'day' => ':count день|:count дня|:count дней',
'd' => ':count день|:count дня|:count дней',
'hour' => ':count час|:count часа|:count часов',
'h' => ':count час|:count часа|:count часов',
'minute' => ':count минуту|:count минуты|:count минут',
'min' => ':count минуту|:count минуты|:count минут',
'second' => ':count секунду|:count секунды|:count секунд',
's' => ':count секунду|:count секунды|:count секунд',
'ago' => ':time назад',
'from_now' => 'через :time',
'after' => ':time после',
'before' => ':time до',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count godina|:count godine|:count godina',
'y' => ':count godina|:count godine|:count godina',
'month' => ':count mesec|:count meseca|:count meseci',
'm' => ':count mesec|:count meseca|:count meseci',
'week' => ':count nedelja|:count nedelje|:count nedelja',
'w' => ':count nedelja|:count nedelje|:count nedelja',
'day' => ':count dan|:count dana|:count dana',
'd' => ':count dan|:count dana|:count dana',
'hour' => ':count čas|:count časa|:count časova',
'h' => ':count čas|:count časa|:count časova',
'minute' => ':count minut|:count minuta|:count minuta',
'min' => ':count minut|:count minuta|:count minuta',
'second' => ':count sekund|:count sekunda|:count sekundi',
's' => ':count sekund|:count sekunda|:count sekundi',
'ago' => 'pre :time',
'from_now' => 'za :time',
'after' => 'nakon :time',
'before' => ':time raniјe',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,31 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sk/date.php
*/
return array(
'year' => 'rok|:count roky|:count rokov',
'month' => 'mesiac|:count mesiace|:count mesiacov',
'week' => 'týždeň|:count týždne|:count týždňov',
'day' => 'deň|:count dni|:count dní',
'hour' => 'hodinu|:count hodiny|:count hodín',
'minute' => 'minútu|:count minúty|:count minút',
'second' => 'sekundu|:count sekundy|:count sekúnd',
'ago' => 'pred :time',
'from_now' => 'za :time',
'after' => ':time neskôr',
'before' => ':time predtým'
'year' => 'rok|:count roky|:count rokov',
'y' => 'rok|:count roky|:count rokov',
'month' => 'mesiac|:count mesiace|:count mesiacov',
'm' => 'mesiac|:count mesiace|:count mesiacov',
'week' => 'týždeň|:count týždne|:count týždňov',
'w' => 'týždeň|:count týždne|:count týždňov',
'day' => 'deň|:count dni|:count dní',
'd' => 'deň|:count dni|:count dní',
'hour' => 'hodinu|:count hodiny|:count hodín',
'h' => 'hodinu|:count hodiny|:count hodín',
'minute' => 'minútu|:count minúty|:count minút',
'min' => 'minútu|:count minúty|:count minút',
'second' => 'sekundu|:count sekundy|:count sekúnd',
's' => 'sekundu|:count sekundy|:count sekúnd',
'ago' => 'pred :time',
'from_now' => 'za :time',
'after' => 'o :time neskôr',
'before' => ':time predtým',
'year_ago' => 'rokom|:count rokmi|:count rokmi',
'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi',
'week_ago' => 'týždňom|:count týždňami|:count týždňami',
'day_ago' => 'dňom|:count dňami|:count dňami',
'hour_ago' => 'hodinou|:count hodinami|:count hodinami',
'minute_ago' => 'minútou|:count minútami|:count minútami',
'second_ago' => 'sekundou|:count sekundami|:count sekundami',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,30 +8,36 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sl/date.php
*/
return array(
'year' => ':count leto|:count leti|:count leta|:count let',
'month' => ':count mesec|:count meseca|:count mesece|:count mesecev',
'week' => ':count teden|:count tedna|:count tedne|:count tednov',
'day' => ':count dan|:count dni|:count dni|:count dni',
'hour' => ':count uro|:count uri|:count ure|:count ur',
'minute' => ':count minuto|:count minuti|:count minute|:count minut',
'second' => ':count sekundo|:count sekundi|:count sekunde|:count sekund',
'year_ago' => ':count letom|:count leti|:count leti|:count leti',
'year' => ':count leto|:count leti|:count leta|:count let',
'y' => ':count leto|:count leti|:count leta|:count let',
'month' => ':count mesec|:count meseca|:count mesece|:count mesecev',
'm' => ':count mesec|:count meseca|:count mesece|:count mesecev',
'week' => ':count teden|:count tedna|:count tedne|:count tednov',
'w' => ':count teden|:count tedna|:count tedne|:count tednov',
'day' => ':count dan|:count dni|:count dni|:count dni',
'd' => ':count dan|:count dni|:count dni|:count dni',
'hour' => ':count uro|:count uri|:count ure|:count ur',
'h' => ':count uro|:count uri|:count ure|:count ur',
'minute' => ':count minuto|:count minuti|:count minute|:count minut',
'min' => ':count minuto|:count minuti|:count minute|:count minut',
'second' => ':count sekundo|:count sekundi|:count sekunde|:count sekund',
's' => ':count sekundo|:count sekundi|:count sekunde|:count sekund',
'year_ago' => ':count letom|:count leti|:count leti|:count leti',
'month_ago' => ':count mesecem|:count meseci|:count meseci|:count meseci',
'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni',
'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi',
'hour_ago' => ':count uro|:count urama|:count urami|:count urami',
'minute_ago'=> ':count minuto|:count minutama|:count minutami|:count minutami',
'second_ago'=> ':count sekundo|:count sekundama|:count sekundami|:count sekundami',
'ago' => 'pred :time',
'from_now' => 'čez :time',
'after' => 'čez :time',
'before' => 'pred :time'
'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni',
'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi',
'hour_ago' => ':count uro|:count urama|:count urami|:count urami',
'minute_ago' => ':count minuto|:count minutama|:count minutami|:count minutami',
'second_ago' => ':count sekundo|:count sekundama|:count sekundami|:count sekundami',
'ago' => 'pred :time',
'from_now' => 'čez :time',
'after' => 'čez :time',
'before' => 'pred :time',
'diff_now' => 'ravnokar',
'diff_yesterday' => 'včeraj',
'diff_tomorrow' => 'jutri',
'diff_before_yesterday' => 'predvčerajšnjim',
'diff_after_tomorrow' => 'pojutrišnjem',
);

View File

@@ -9,20 +9,23 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => '1 vit|:count vjet',
'month' => '1 muaj|:count muaj',
'week' => '1 javë|:count javë',
'day' => '1 ditë|:count ditë',
'hour' => '1 orë|:count orë',
'minute' => '1 minutë|:count minuta',
'second' => '1 sekondë|:count sekonda',
'ago' => ':time më parë',
'from_now' => ':time nga tani',
'after' => ':time pas',
'before' => ':time para',
'year' => ':count vit|:count vjet',
'y' => ':count vit|:count vjet',
'month' => ':count muaj|:count muaj',
'm' => ':count muaj|:count muaj',
'week' => ':count javë|:count javë',
'w' => ':count javë|:count javë',
'day' => ':count ditë|:count ditë',
'd' => ':count ditë|:count ditë',
'hour' => ':count orë|:count orë',
'h' => ':count orë|:count orë',
'minute' => ':count minutë|:count minuta',
'min' => ':count minutë|:count minuta',
'second' => ':count sekondë|:count sekonda',
's' => ':count sekondë|:count sekonda',
'ago' => ':time më parë',
'from_now' => ':time nga tani',
'after' => ':time pas',
'before' => ':time para',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,30 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sr/date.php
*/
return array(
'year' => ':count godina|:count godine|:count godina',
'month' => ':count mesec|:count meseca|:count meseci',
'week' => ':count nedelja|:count nedelje|:count nedelja',
'day' => ':count dan|:count dana|:count dana',
'hour' => ':count sat|:count sata|:count sati',
'minute' => ':count minut|:count minuta |:count minuta',
'second' => ':count sekund|:count sekunde|:count sekunde',
'ago' => 'pre :time',
'from_now' => ':time od sada',
'after' => 'nakon :time',
'before' => 'pre :time'
'year' => ':count godina|:count godine|:count godina',
'y' => ':count godina|:count godine|:count godina',
'month' => ':count mesec|:count meseca|:count meseci',
'm' => ':count mesec|:count meseca|:count meseci',
'week' => ':count nedelja|:count nedelje|:count nedelja',
'w' => ':count nedelja|:count nedelje|:count nedelja',
'day' => ':count dan|:count dana|:count dana',
'd' => ':count dan|:count dana|:count dana',
'hour' => ':count sat|:count sata|:count sati',
'h' => ':count sat|:count sata|:count sati',
'minute' => ':count minut|:count minuta |:count minuta',
'min' => ':count minut|:count minuta |:count minuta',
'second' => ':count sekund|:count sekunde|:count sekunde',
's' => ':count sekund|:count sekunde|:count sekunde',
'ago' => 'pre :time',
'from_now' => ':time od sada',
'after' => 'nakon :time',
'before' => 'pre :time',
'year_from_now' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina',
'year_ago' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina',
'week_from_now' => '{1} :count nedelju|{2,3,4} :count nedelje|[5,Inf[ :count nedelja',
'week_ago' => '{1} :count nedelju|{2,3,4} :count nedelje|[5,Inf[ :count nedelja',
);

View File

@@ -0,0 +1,43 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Nikola Zeravcic <office@bytenet.rs>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[ :count година',
'y' => ':count г.',
'month' => '{1} :count месец|{2,3,4}:count месеца|[5,Inf[ :count месеци',
'm' => ':count м.',
'week' => '{1} :count недеља|{2,3,4}:count недеље|[5,Inf[ :count недеља',
'w' => ':count нед.',
'day' => '{1,21,31} :count дан|[2,Inf[ :count дана',
'd' => ':count д.',
'hour' => '{1,21} :count сат|{2,3,4,22,23,24}:count сата|[5,Inf[ :count сати',
'h' => ':count ч.',
'minute' => '{1,21,31,41,51} :count минут|[2,Inf[ :count минута',
'min' => ':count мин.',
'second' => '{1,21,31,41,51} :count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[5,Inf[:count секунди',
's' => ':count сек.',
'ago' => 'пре :time',
'from_now' => 'за :time',
'after' => ':time након',
'before' => ':time пре',
'year_from_now' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година',
'year_ago' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година',
'week_from_now' => '{1} :count недељу|{2,3,4} :count недеље|[5,Inf[ :count недеља',
'week_ago' => '{1} :count недељу|{2,3,4} :count недеље|[5,Inf[ :count недеља',
'diff_now' => 'управо сада',
'diff_yesterday' => 'јуче',
'diff_tomorrow' => 'сутра',
'diff_before_yesterday' => 'прекјуче',
'diff_after_tomorrow' => 'прекосутра',
);

View File

@@ -0,0 +1,43 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[ :count година',
'y' => ':count г.',
'month' => '{1} :count мјесец|{2,3,4}:count мјесеца|[5,Inf[ :count мјесеци',
'm' => ':count мј.',
'week' => '{1} :count недјеља|{2,3,4}:count недјеље|[5,Inf[ :count недјеља',
'w' => ':count нед.',
'day' => '{1,21,31} :count дан|[2,Inf[ :count дана',
'd' => ':count д.',
'hour' => '{1,21} :count сат|{2,3,4,22,23,24}:count сата|[5,Inf[ :count сати',
'h' => ':count ч.',
'minute' => '{1,21,31,41,51} :count минут|[2,Inf[ :count минута',
'min' => ':count мин.',
'second' => '{1,21,31,41,51} :count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[5,Inf[:count секунди',
's' => ':count сек.',
'ago' => 'прије :time',
'from_now' => 'за :time',
'after' => ':time након',
'before' => ':time прије',
'year_from_now' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година',
'year_ago' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година',
'week_from_now' => '{1} :count недјељу|{2,3,4} :count недјеље|[5,Inf[ :count недјеља',
'week_ago' => '{1} :count недјељу|{2,3,4} :count недјеље|[5,Inf[ :count недјеља',
'diff_now' => 'управо сада',
'diff_yesterday' => 'јуче',
'diff_tomorrow' => 'сутра',
'diff_before_yesterday' => 'прекјуче',
'diff_after_tomorrow' => 'прекосјутра',
);

View File

@@ -0,0 +1,43 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count godine|[0,Inf[ :count godina',
'y' => ':count g.',
'month' => '{1} :count mjesec|{2,3,4}:count mjeseca|[5,Inf[ :count mjeseci',
'm' => ':count mj.',
'week' => '{1} :count nedjelja|{2,3,4}:count nedjelje|[5,Inf[ :count nedjelja',
'w' => ':count ned.',
'day' => '{1,21,31} :count dan|[2,Inf[ :count dana',
'd' => ':count d.',
'hour' => '{1,21} :count sat|{2,3,4,22,23,24}:count sata|[5,Inf[ :count sati',
'h' => ':count č.',
'minute' => '{1,21,31,41,51} :count minut|[2,Inf[ :count minuta',
'min' => ':count min.',
'second' => '{1,21,31,41,51} :count sekund|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count sekunde|[5,Inf[:count sekundi',
's' => ':count sek.',
'ago' => 'prije :time',
'from_now' => 'za :time',
'after' => ':time nakon',
'before' => ':time prije',
'year_from_now' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina',
'year_ago' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina',
'week_from_now' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja',
'week_ago' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja',
'diff_now' => 'upravo sada',
'diff_yesterday' => 'juče',
'diff_tomorrow' => 'sutra',
'diff_before_yesterday' => 'prekjuče',
'diff_after_tomorrow' => 'preksutra',
);

View File

@@ -0,0 +1,12 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return require __DIR__.'/sr_Latn_ME.php';

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sv/date.php
*/
return array(
'year' => '1 år|:count år',
'month' => '1 månad|:count månader',
'week' => '1 vecka|:count veckor',
'day' => '1 dag|:count dagar',
'hour' => '1 timme|:count timmar',
'minute' => '1 minut|:count minuter',
'second' => '1 sekund|:count sekunder',
'ago' => ':time sedan',
'from_now' => 'om :time',
'after' => ':time efter',
'before' => ':time före'
'year' => ':count år|:count år',
'y' => ':count år|:count år',
'month' => ':count månad|:count månader',
'm' => ':count månad|:count månader',
'week' => ':count vecka|:count veckor',
'w' => ':count vecka|:count veckor',
'day' => ':count dag|:count dagar',
'd' => ':count dag|:count dagar',
'hour' => ':count timme|:count timmar',
'h' => ':count timme|:count timmar',
'minute' => ':count minut|:count minuter',
'min' => ':count minut|:count minuter',
'second' => ':count sekund|:count sekunder',
's' => ':count sekund|:count sekunder',
'ago' => ':time sedan',
'from_now' => 'om :time',
'after' => ':time efter',
'before' => ':time före',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => 'mwaka 1|miaka :count',
'y' => 'mwaka 1|miaka :count',
'month' => 'mwezi 1|miezi :count',
'm' => 'mwezi 1|miezi :count',
'week' => 'wiki 1|wiki :count',
'w' => 'wiki 1|wiki :count',
'day' => 'siku 1|siku :count',
'd' => 'siku 1|siku :count',
'hour' => 'saa 1|masaa :count',
'h' => 'saa 1|masaa :count',
'minute' => 'dakika 1|dakika :count',
'min' => 'dakika 1|dakika :count',
'second' => 'sekunde 1|sekunde :count',
's' => 'sekunde 1|sekunde :count',
'ago' => ':time ziliyopita',
'from_now' => ':time kwanzia sasa',
'after' => ':time baada',
'before' => ':time kabla',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/th/date.php
*/
return array(
'year' => '1 ปี|:count ปี',
'month' => '1 เดือน|:count เดือน',
'week' => '1 สัปดาห์|:count สัปดาห์',
'day' => '1 วัน|:count วัน',
'hour' => '1 ชั่วโมง|:count ชั่วโมง',
'minute' => '1 นาที|:count นาที',
'second' => '1 วินาที|:count วินาที',
'ago' => ':time ที่แล้ว',
'from_now' => ':time จากนี้',
'after' => 'หลัง:time',
'before' => 'ก่อน:time'
'year' => ':count ปี',
'y' => ':count ปี',
'month' => ':count เดือน',
'm' => ':count เดือน',
'week' => ':count สัปดาห์',
'w' => ':count สัปดาห์',
'day' => ':count วัน',
'd' => ':count วัน',
'hour' => ':count ชั่วโมง',
'h' => ':count ชั่วโมง',
'minute' => ':count นาที',
'min' => ':count นาที',
'second' => ':count วินาที',
's' => ':count วินาที',
'ago' => ':timeที่แล้ว',
'from_now' => ':timeต่อจากนี้',
'after' => ':timeหลังจากนี้',
'before' => ':timeก่อน',
);

View File

@@ -9,20 +9,23 @@
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => ':count yıl',
'month' => ':count ay',
'week' => ':count hafta',
'day' => ':count gün',
'hour' => ':count saat',
'minute' => ':count dakika',
'second' => ':count saniye',
'ago' => ':time önce',
'from_now' => ':time andan itibaren',
'after' => ':time sonra',
'before' => ':time önce',
'year' => ':count yıl',
'y' => ':count yıl',
'month' => ':count ay',
'm' => ':count ay',
'week' => ':count hafta',
'w' => ':count hafta',
'day' => ':count gün',
'd' => ':count gün',
'hour' => ':count saat',
'h' => ':count saat',
'minute' => ':count dakika',
'min' => ':count dakika',
'second' => ':count saniye',
's' => ':count saniye',
'ago' => ':time önce',
'from_now' => ':time sonra',
'after' => ':time sonra',
'before' => ':time önce',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,33 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/uk/date.php
*/
return array(
'year' => ':count рік|:count роки|:count років',
'month' => ':count місяць|:count місяці|:count місяців',
'week' => ':count тиждень|:count тижні|:count тижнів',
'day' => ':count день|:count дні|:count днів',
'hour' => ':count година|:count години|:count годин',
'minute' => ':count хвилину|:count хвилини|:count хвилин',
'second' => ':count секунду|:count секунди|:count секунд',
'ago' => ':time назад',
'from_now' => 'через :time',
'after' => ':time після',
'before' => ':time до'
'year' => ':count рік|:count роки|:count років',
'y' => ':count рік|:count роки|:count років',
'month' => ':count місяць|:count місяці|:count місяців',
'm' => ':count місяць|:count місяці|:count місяців',
'week' => ':count тиждень|:count тижні|:count тижнів',
'w' => ':count тиждень|:count тижні|:count тижнів',
'day' => ':count день|:count дні|:count днів',
'd' => ':count день|:count дні|:count днів',
'hour' => ':count година|:count години|:count годин',
'h' => ':count година|:count години|:count годин',
'minute' => ':count хвилину|:count хвилини|:count хвилин',
'min' => ':count хвилину|:count хвилини|:count хвилин',
'second' => ':count секунду|:count секунди|:count секунд',
's' => ':count секунду|:count секунди|:count секунд',
'ago' => ':time тому',
'from_now' => 'через :time',
'after' => ':time після',
'before' => ':time до',
'diff_now' => 'щойно',
'diff_yesterday' => 'вчора',
'diff_tomorrow' => 'завтра',
'diff_before_yesterday' => 'позавчора',
'diff_after_tomorrow' => 'післязавтра',
'period_recurrences' => 'один раз|:count рази|:count разів',
'period_interval' => 'кожні :interval',
'period_start_date' => 'з :date',
'period_end_date' => 'до :date',
);

View File

@@ -0,0 +1,24 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count سال',
'month' => ':count ماه',
'week' => ':count ہفتے',
'day' => ':count روز',
'hour' => ':count گھنٹے',
'minute' => ':count منٹ',
'second' => ':count سیکنڈ',
'ago' => ':time پہلے',
'from_now' => ':time بعد',
'after' => ':time بعد',
'before' => ':time پہلے',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,21 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
return array(
'year' => ':count yil|:count yil|:count yil',
'month' => ':count oy|:count oy|:count oylar',
'week' => ':count hafta|:count hafta|:count hafta',
'day' => ':count kun|:count kun|:count kun',
'hour' => ':count soat|:count soat|:count soat',
'minute' => ':count minut|:count minut|:count minut',
'second' => ':count sekund|:count sekund|:count sekund',
'ago' => ':time avval',
'from_now' => 'keyin :time',
'after' => ':time keyin',
'before' => ':time gacha'
'year' => ':count yil',
'y' => ':count yil',
'month' => ':count oy',
'm' => ':count oy',
'week' => ':count hafta',
'w' => ':count hafta',
'day' => ':count kun',
'd' => ':count kun',
'hour' => ':count soat',
'h' => ':count soat',
'minute' => ':count daqiqa',
'min' => ':count daq',
'second' => ':count soniya',
's' => ':count s',
'ago' => ':time avval',
'from_now' => ':time dan keyin',
'after' => ':time keyin',
'before' => ':time oldin',
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/vi/date.php
*/
return array(
'year' => ':count năm',
'month' => ':count tháng',
'week' => ':count tuần',
'day' => ':count ngày',
'hour' => ':count giờ',
'minute' => ':count phút',
'second' => ':count giây',
'ago' => ':time trước',
'from_now' => ':time từ bây giờ',
'after' => ':time sau',
'before' => ':time trước'
'year' => ':count năm',
'y' => ':count năm',
'month' => ':count tháng',
'm' => ':count tháng',
'week' => ':count tuần',
'w' => ':count tuần',
'day' => ':count ngày',
'd' => ':count ngày',
'hour' => ':count giờ',
'h' => ':count giờ',
'minute' => ':count phút',
'min' => ':count phút',
'second' => ':count giây',
's' => ':count giây',
'ago' => ':time trước',
'from_now' => ':time từ bây giờ',
'after' => ':time sau',
'before' => ':time trước',
);

View File

@@ -1,29 +0,0 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/zh-TW/date.php
*/
return array(
'year' => ':count 年',
'month' => ':count 月',
'week' => ':count 周',
'day' => ':count 天',
'hour' => ':count 小時',
'minute' => ':count 分鐘',
'second' => ':count 秒',
'ago' => ':time前',
'from_now' => '距現在 :time',
'after' => ':time後',
'before' => ':time前'
);

View File

@@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Carbon package.
*
@@ -7,23 +8,24 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Translation messages. See http://symfony.com/doc/current/book/translation.html
* for possible formats.
*/
/**
* Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/zh/date.php
*/
return array(
'year' => ':count年',
'month' => ':count',
'week' => ':count',
'day' => ':count',
'hour' => ':count小时',
'minute' => ':count分钟',
'second' => ':count',
'ago' => ':time前',
'from_now' => ':time距现在',
'after' => ':time后',
'before' => ':time前'
'year' => ':count年',
'y' => ':count',
'month' => ':count个月',
'm' => ':count个月',
'week' => ':count',
'w' => ':count',
'day' => ':count',
'd' => ':count天',
'hour' => ':count小时',
'h' => ':count小时',
'minute' => ':count分钟',
'min' => ':count分钟',
'second' => ':count秒',
's' => ':count秒',
'ago' => ':time前',
'from_now' => '距现在:time',
'after' => ':time后',
'before' => ':time前',
);

View File

@@ -0,0 +1,31 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array(
'year' => ':count年',
'y' => ':count年',
'month' => ':count月',
'm' => ':count月',
'week' => ':count週',
'w' => ':count週',
'day' => ':count天',
'd' => ':count天',
'hour' => ':count小時',
'h' => ':count小時',
'minute' => ':count分鐘',
'min' => ':count分鐘',
'second' => ':count秒',
's' => ':count秒',
'ago' => ':time前',
'from_now' => '距現在:time',
'after' => ':time後',
'before' => ':time前',
);

View File

@@ -0,0 +1,37 @@
<?php
namespace Carbon\Laravel;
use Carbon\Carbon;
use Illuminate\Events\Dispatcher;
use Illuminate\Events\EventDispatcher;
use Illuminate\Translation\Translator as IlluminateTranslator;
use Symfony\Component\Translation\Translator;
class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function boot()
{
$service = $this;
$events = $this->app['events'];
if ($events instanceof EventDispatcher || $events instanceof Dispatcher) {
$events->listen(class_exists('Illuminate\Foundation\Events\LocaleUpdated') ? 'Illuminate\Foundation\Events\LocaleUpdated' : 'locale.changed', function () use ($service) {
$service->updateLocale();
});
$service->updateLocale();
}
}
public function updateLocale()
{
$translator = $this->app['translator'];
if ($translator instanceof Translator || $translator instanceof IlluminateTranslator) {
Carbon::setLocale($translator->getLocale());
}
}
public function register()
{
// Needed for Laravel < 5.3 compatibility
}
}

View File

@@ -0,0 +1,143 @@
<?php
namespace Carbon;
use Symfony\Component\Translation;
class Translator extends Translation\Translator
{
/**
* Singleton for Translator.
*
* @var static
*/
protected static $singleton;
/**
* List of custom localized messages.
*
* @var array
*/
protected static $messages = array();
/**
* Return a singleton instance of Translator.
*
* @param string|null $locale optional initial locale ("en" - english by default)
*
* @return static
*/
public static function get($locale = null)
{
if (static::$singleton === null) {
static::$singleton = new static($locale ?: 'en');
}
return static::$singleton;
}
public function __construct($locale, Translation\Formatter\MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false)
{
$this->addLoader('array', new Translation\Loader\ArrayLoader());
parent::__construct($locale, $formatter, $cacheDir, $debug);
}
/**
* Reset messages of a locale (all locale if no locale passed).
* Remove custom messages and reload initial messages from matching
* file in Lang directory.
*
* @param string|null $locale
*
* @return bool
*/
public function resetMessages($locale = null)
{
if ($locale === null) {
static::$messages = array();
return true;
}
if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) {
static::$messages[$locale] = require $filename;
$this->addResource('array', static::$messages[$locale], $locale);
return true;
}
return false;
}
/**
* Init messages language from matching file in Lang directory.
*
* @param string $locale
*
* @return bool
*/
protected function loadMessagesFromFile($locale)
{
if (isset(static::$messages[$locale])) {
return true;
}
return $this->resetMessages($locale);
}
/**
* Set messages of a locale and take file first if present.
*
* @param string $locale
* @param array $messages
*
* @return $this
*/
public function setMessages($locale, $messages)
{
$this->loadMessagesFromFile($locale);
$this->addResource('array', $messages, $locale);
static::$messages[$locale] = array_merge(
isset(static::$messages[$locale]) ? static::$messages[$locale] : array(),
$messages
);
return $this;
}
/**
* Get messages of a locale, if none given, return all the
* languages.
*
* @param string|null $locale
*
* @return array
*/
public function getMessages($locale = null)
{
return $locale === null ? static::$messages : static::$messages[$locale];
}
/**
* Set the current translator locale and indicate if the source locale file exists
*
* @param string $locale locale ex. en
*
* @return bool
*/
public function setLocale($locale)
{
$locale = preg_replace_callback('/[-_]([a-z]{2,})/', function ($matches) {
// _2-letters is a region, _3+-letters is a variant
return '_'.call_user_func(strlen($matches[1]) > 2 ? 'ucfirst' : 'strtoupper', $matches[1]);
}, strtolower($locale));
if ($this->loadMessagesFromFile($locale)) {
parent::setLocale($locale);
return true;
}
return false;
}
}