blob: 94c3e04c84e28aa349c6c1530e3d2251fe46b552 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3/**
4 * This file is part of the Carbon package.
5 *
6 * (c) Brian Nesbitt <brian@nesbot.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12/*
13 * Authors:
14 * - Quentí
15 */
16// @codeCoverageIgnoreStart
17if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) {
18 \Symfony\Component\Translation\PluralizationRules::set(function ($number) {
19 return $number == 1 ? 0 : 1;
20 }, 'oc');
21}
22// @codeCoverageIgnoreEnd
23
24return [
25 'year' => ':count an|:count ans',
26 'a_year' => 'un an|:count ans',
27 'y' => ':count an|:count ans',
28 'month' => ':count mes|:count meses',
29 'a_month' => 'un mes|:count meses',
30 'm' => ':count mes|:count meses',
31 'week' => ':count setmana|:count setmanas',
32 'a_week' => 'una setmana|:count setmanas',
33 'w' => ':count setmana|:count setmanas',
34 'day' => ':count jorn|:count jorns',
35 'a_day' => 'un jorn|:count jorns',
36 'd' => ':count jorn|:count jorns',
37 'hour' => ':count ora|:count oras',
38 'a_hour' => 'una ora|:count oras',
39 'h' => ':count ora|:count oras',
40 'minute' => ':count minuta|:count minutas',
41 'a_minute' => 'una minuta|:count minutas',
42 'min' => ':count minuta|:count minutas',
43 'second' => ':count segonda|:count segondas',
44 'a_second' => 'una segonda|:count segondas',
45 's' => ':count segonda|:count segondas',
46 'ago' => 'fa :time',
47 'from_now' => 'd\'aquí :time',
48 'after' => ':time aprèp',
49 'before' => ':time abans',
50 'diff_now' => 'ara meteis',
51 'diff_today' => 'Uèi',
52 'diff_today_regexp' => 'Uèi(?:\\s+a)?',
53 'diff_yesterday' => 'ièr',
54 'diff_yesterday_regexp' => 'Ièr(?:\\s+a)?',
55 'diff_tomorrow' => 'deman',
56 'diff_tomorrow_regexp' => 'Deman(?:\\s+a)?',
57 'diff_before_yesterday' => 'ièr delà',
58 'diff_after_tomorrow' => 'deman passat',
59 'period_recurrences' => ':count còp|:count còps',
60 'period_interval' => 'cada :interval',
61 'period_start_date' => 'de :date',
62 'period_end_date' => 'fins a :date',
63 'formats' => [
64 'LT' => 'H:mm',
65 'LTS' => 'H:mm:ss',
66 'L' => 'DD/MM/YYYY',
67 'LL' => 'D MMMM [de] YYYY',
68 'LLL' => 'D MMMM [de] YYYY [a] H:mm',
69 'LLLL' => 'dddd D MMMM [de] YYYY [a] H:mm',
70 ],
71 'calendar' => [
72 'sameDay' => '[Uèi a] LT',
73 'nextDay' => '[Deman a] LT',
74 'nextWeek' => 'dddd [a] LT',
75 'lastDay' => '[Ièr a] LT',
76 'lastWeek' => 'dddd [passat a] LT',
77 'sameElse' => 'L',
78 ],
79 'months' => ['de genièr', 'de febrièr', 'de març', 'd\'abrial', 'de mai', 'de junh', 'de julhet', 'd\'agost', 'de setembre', 'd’octòbre', 'de novembre', 'de decembre'],
80 'months_standalone' => ['genièr', 'febrièr', 'març', 'abrial', 'mai', 'junh', 'julh', 'agost', 'setembre', 'octòbre', 'novembre', 'decembre'],
81 'months_short' => ['gen.', 'feb.', 'març', 'abr.', 'mai', 'junh', 'julh', 'ago.', 'sep.', 'oct.', 'nov.', 'dec.'],
82 'weekdays' => ['dimenge', 'diluns', 'dimars', 'dimècres', 'dijòus', 'divendres', 'dissabte'],
83 'weekdays_short' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'],
84 'weekdays_min' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'],
85 'ordinal' => function ($number, string $period = '') {
86 $ordinal = [1 => 'èr', 2 => 'nd'][(int) $number] ?? 'en';
87
88 // feminine for year, week, hour, minute, second
89 if (preg_match('/^[yYwWhHgGis]$/', $period)) {
90 $ordinal .= 'a';
91 }
92
93 return $number.$ordinal;
94 },
95 'first_day_of_week' => 1,
96 'day_of_first_week_of_year' => 4,
97 'list' => [', ', ' e '],
98];