Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • sibidharan/api-development-course-apr-2021
  • krithikramraja/api-development-course-apr-2021
  • monish-palanikumar/api-development-course-apr-2021
  • Pranesh/api-development-course-apr-2021
  • ganesha005/api-development-course-apr-2021
  • selva1011/api-development-course-apr-2021
  • hema/api-development-course-apr-2021
  • Kartheeekn/api-development-course-apr-2021
  • GopiKrishnan/api-development-course-apr-2021
  • Mhd_khalid/api-development-course-apr-2021
  • sibivarma/api-development-course-apr-2021
  • ramanajsr1/api-development-course-apr-2021
  • rahulprem2k2910/api-development-course-apr-2021
  • sabarinathanfb/api-development-course-apr-2021
  • hariharanrd/api-development-course-apr-2021
  • Akram24/api-development-course-apr-2021
  • At_muthu__/api-development-course-apr-2021
  • rii/api-development-course-apr-2021
  • harishvarmaj7/api-development-course-apr-2021
  • moovendhan/rest-api
  • k3XD16/api-development-course-apr-2021
  • vimal/api-development-course-apr-2021
  • shiva007/api-development-course-apr-2021
  • Amudhan/api-development-course-apr-2021
  • abinayacyber604/api-development-course-apr-2021
  • subash_19/api
  • Saransaran/api-development-course-apr-2021
27 results
Show changes
Showing
with 2594 additions and 0 deletions
<?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__.'/zh_Hans.php';
<?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__.'/zh_Hans.php';
<?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__.'/zh_Hans.php';
<?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.
*/
/*
* Authors:
* - Adam
* - monkeycon
* - François B
* - Jason Katz-Brown
* - Chris Lam
* - Serhan Apaydın
* - Gary Lo
* - JD Isaacks
* - Chris Hemp
* - Eddie
* - KID
* - shankesgk2
* - Daniel Cheung (danvim)
*/
return [
'year' => ':count:optional-space年',
'y' => ':count:optional-space年',
'month' => ':count:optional-space個月',
'm' => ':count:optional-space月',
'week' => ':count:optional-space週',
'w' => ':count:optional-space週',
'day' => ':count:optional-space天',
'd' => ':count:optional-space天',
'hour' => ':count:optional-space小時',
'h' => ':count:optional-space小時',
'minute' => ':count:optional-space分鐘',
'min' => ':count:optional-space分鐘',
'second' => ':count:optional-space秒',
'a_second' => '{1}幾秒|]1,Inf[:count:optional-space秒',
's' => ':count:optional-space秒',
'ago' => ':time前',
'from_now' => ':time後',
'after' => ':time後',
'before' => ':time前',
'diff_now' => '現在',
'diff_today' => '今天',
'diff_yesterday' => '昨天',
'diff_tomorrow' => '明天',
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'YYYY/MM/DD',
'LL' => 'YYYY年M月D日',
'LLL' => 'YYYY年M月D日 HH:mm',
'LLLL' => 'YYYY年M月D日dddd HH:mm',
],
'calendar' => [
'sameDay' => '[今天] LT',
'nextDay' => '[明天] LT',
'nextWeek' => '[下]dddd LT',
'lastDay' => '[昨天] LT',
'lastWeek' => '[上]dddd LT',
'sameElse' => 'L',
],
'ordinal' => function ($number, $period) {
switch ($period) {
case 'd':
case 'D':
case 'DDD':
return $number.'日';
case 'M':
return $number.'月';
case 'w':
case 'W':
return $number.'周';
default:
return $number;
}
},
'meridiem' => function ($hour, $minute) {
$time = $hour * 100 + $minute;
if ($time < 600) {
return '凌晨';
}
if ($time < 900) {
return '早上';
}
if ($time < 1130) {
return '上午';
}
if ($time < 1230) {
return '中午';
}
if ($time < 1800) {
return '下午';
}
return '晚上';
},
'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
'weekdays_short' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'],
'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 4,
'list' => '',
];
<?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__.'/zh_Hant.php';
<?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__.'/zh_Hant.php';
<?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__.'/zh_Hant.php';
<?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.
*/
/*
* Authors:
* - tarunvelli
* - Eddie
* - KID
* - shankesgk2
*/
return array_replace_recursive(require __DIR__.'/zh_Hant.php', [
'after' => ':time后',
]);
<?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.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
*/
return array_replace_recursive(require __DIR__.'/zh.php', [
'formats' => [
'L' => 'YYYY年MM月DD日',
],
'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
'months_short' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'],
'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'],
'day_of_first_week_of_year' => 1,
]);
<?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__.'/zh_Hant_TW.php';
<?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.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
*/
return array_replace_recursive(require __DIR__.'/zh.php', [
'formats' => [
'L' => 'YYYY-MM-DD',
],
]);
<?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.
*/
/*
* Unknown default region, use the first alphabetically.
*/
return require __DIR__.'/zu_ZA.php';
<?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.
*/
/*
* Authors:
* - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD/MM/YYYY',
],
'months' => ['Januwari', 'Februwari', 'Mashi', 'Ephreli', 'Meyi', 'Juni', 'Julayi', 'Agasti', 'Septhemba', 'Okthoba', 'Novemba', 'Disemba'],
'months_short' => ['Jan', 'Feb', 'Mas', 'Eph', 'Mey', 'Jun', 'Jul', 'Aga', 'Sep', 'Okt', 'Nov', 'Dis'],
'weekdays' => ['iSonto', 'uMsombuluko', 'uLwesibili', 'uLwesithathu', 'uLwesine', 'uLwesihlanu', 'uMgqibelo'],
'weekdays_short' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'],
'weekdays_min' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'],
'day_of_first_week_of_year' => 1,
'year' => 'kweminyaka engu-:count',
'y' => 'kweminyaka engu-:count',
'a_year' => 'kweminyaka engu-:count',
'month' => 'izinyanga ezingu-:count',
'm' => 'izinyanga ezingu-:count',
'a_month' => 'izinyanga ezingu-:count',
'week' => 'lwamasonto angu-:count',
'w' => 'lwamasonto angu-:count',
'a_week' => 'lwamasonto angu-:count',
'day' => 'ezingaba ngu-:count',
'd' => 'ezingaba ngu-:count',
'a_day' => 'ezingaba ngu-:count',
'hour' => 'amahora angu-:count',
'h' => 'amahora angu-:count',
'a_hour' => 'amahora angu-:count',
'minute' => 'ngemizuzu engu-:count',
'min' => 'ngemizuzu engu-:count',
'a_minute' => 'ngemizuzu engu-:count',
'second' => 'imizuzwana engu-:count',
's' => 'imizuzwana engu-:count',
'a_second' => 'imizuzwana engu-:count',
]);
<?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;
use JsonSerializable;
class Language implements JsonSerializable
{
/**
* @var array
*/
protected static $languagesNames;
/**
* @var array
*/
protected static $regionsNames;
/**
* @var string
*/
protected $id;
/**
* @var string
*/
protected $code;
/**
* @var string|null
*/
protected $variant;
/**
* @var string|null
*/
protected $region;
/**
* @var array
*/
protected $names;
/**
* @var string
*/
protected $isoName;
/**
* @var string
*/
protected $nativeName;
public function __construct(string $id)
{
$this->id = str_replace('-', '_', $id);
$parts = explode('_', $this->id);
$this->code = $parts[0];
if (isset($parts[1])) {
if (!preg_match('/^[A-Z]+$/', $parts[1])) {
$this->variant = $parts[1];
$parts[1] = $parts[2] ?? null;
}
if ($parts[1]) {
$this->region = $parts[1];
}
}
}
/**
* Get the list of the known languages.
*
* @return array
*/
public static function all()
{
if (!static::$languagesNames) {
static::$languagesNames = require __DIR__.'/List/languages.php';
}
return static::$languagesNames;
}
/**
* Get the list of the known regions.
*
* @return array
*/
public static function regions()
{
if (!static::$regionsNames) {
static::$regionsNames = require __DIR__.'/List/regions.php';
}
return static::$regionsNames;
}
/**
* Get both isoName and nativeName as an array.
*
* @return array
*/
public function getNames(): array
{
if (!$this->names) {
$this->names = static::all()[$this->code] ?? [
'isoName' => $this->code,
'nativeName' => $this->code,
];
}
return $this->names;
}
/**
* Returns the original locale ID.
*
* @return string
*/
public function getId(): string
{
return $this->id;
}
/**
* Returns the code of the locale "en"/"fr".
*
* @return string
*/
public function getCode(): string
{
return $this->code;
}
/**
* Returns the variant code such as cyrl/latn.
*
* @return string|null
*/
public function getVariant(): ?string
{
return $this->variant;
}
/**
* Returns the variant such as Cyrillic/Latin.
*
* @return string|null
*/
public function getVariantName(): ?string
{
if ($this->variant === 'Latn') {
return 'Latin';
}
if ($this->variant === 'Cyrl') {
return 'Cyrillic';
}
return $this->variant;
}
/**
* Returns the region part of the locale.
*
* @return string|null
*/
public function getRegion(): ?string
{
return $this->region;
}
/**
* Returns the region name for the current language.
*
* @return string|null
*/
public function getRegionName(): ?string
{
return $this->region ? (static::regions()[$this->region] ?? $this->region) : null;
}
/**
* Returns the long ISO language name.
*
* @return string
*/
public function getFullIsoName(): string
{
if (!$this->isoName) {
$this->isoName = $this->getNames()['isoName'];
}
return $this->isoName;
}
/**
* Set the ISO language name.
*
* @param string $isoName
*/
public function setIsoName(string $isoName): self
{
$this->isoName = $isoName;
return $this;
}
/**
* Return the full name of the language in this language.
*
* @return string
*/
public function getFullNativeName(): string
{
if (!$this->nativeName) {
$this->nativeName = $this->getNames()['nativeName'];
}
return $this->nativeName;
}
/**
* Set the name of the language in this language.
*
* @param string $nativeName
*/
public function setNativeName(string $nativeName): self
{
$this->nativeName = $nativeName;
return $this;
}
/**
* Returns the short ISO language name.
*
* @return string
*/
public function getIsoName(): string
{
$name = $this->getFullIsoName();
return trim(strstr($name, ',', true) ?: $name);
}
/**
* Get the short name of the language in this language.
*
* @return string
*/
public function getNativeName(): string
{
$name = $this->getFullNativeName();
return trim(strstr($name, ',', true) ?: $name);
}
/**
* Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.
*
* @return string
*/
public function getIsoDescription()
{
$region = $this->getRegionName();
$variant = $this->getVariantName();
return $this->getIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : '');
}
/**
* Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable.
*
* @return string
*/
public function getNativeDescription()
{
$region = $this->getRegionName();
$variant = $this->getVariantName();
return $this->getNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : '');
}
/**
* Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable.
*
* @return string
*/
public function getFullIsoDescription()
{
$region = $this->getRegionName();
$variant = $this->getVariantName();
return $this->getFullIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : '');
}
/**
* Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable.
*
* @return string
*/
public function getFullNativeDescription()
{
$region = $this->getRegionName();
$variant = $this->getVariantName();
return $this->getFullNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : '');
}
/**
* Returns the original locale ID.
*
* @return string
*/
public function __toString()
{
return $this->getId();
}
/**
* Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.
*
* @return string
*/
public function jsonSerialize()
{
return $this->getIsoDescription();
}
}
<?php
namespace Carbon\Laravel;
use Carbon\Carbon;
use Carbon\CarbonImmutable;
use Carbon\CarbonInterval;
use Carbon\CarbonPeriod;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Events\Dispatcher;
use Illuminate\Events\EventDispatcher;
use Illuminate\Support\Carbon as IlluminateCarbon;
use Illuminate\Support\Facades\Date;
use Throwable;
class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function boot()
{
$this->updateLocale();
if (!$this->app->bound('events')) {
return;
}
$service = $this;
$events = $this->app['events'];
if ($this->isEventDispatcher($events)) {
$events->listen(class_exists('Illuminate\Foundation\Events\LocaleUpdated') ? 'Illuminate\Foundation\Events\LocaleUpdated' : 'locale.changed', function () use ($service) {
$service->updateLocale();
});
}
}
public function updateLocale()
{
$app = $this->app && method_exists($this->app, 'getLocale') ? $this->app : app('translator');
$locale = $app->getLocale();
Carbon::setLocale($locale);
CarbonImmutable::setLocale($locale);
CarbonPeriod::setLocale($locale);
CarbonInterval::setLocale($locale);
if (class_exists(IlluminateCarbon::class)) {
IlluminateCarbon::setLocale($locale);
}
if (class_exists(Date::class)) {
try {
$root = Date::getFacadeRoot();
$root->setLocale($locale);
} catch (Throwable $e) {
// Non Carbon class in use in Date facade
}
}
}
public function register()
{
// Needed for Laravel < 5.3 compatibility
}
protected function isEventDispatcher($instance)
{
return $instance instanceof EventDispatcher
|| $instance instanceof Dispatcher
|| $instance instanceof DispatcherContract;
}
}
<?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 [
/*
* ISO 639-2
*/
'ab' => [
'isoName' => 'Abkhazian',
'nativeName' => 'аҧсуа бызшәа, аҧсшәа',
],
'aa' => [
'isoName' => 'Afar',
'nativeName' => 'Afaraf',
],
'af' => [
'isoName' => 'Afrikaans',
'nativeName' => 'Afrikaans',
],
'ak' => [
'isoName' => 'Akan',
'nativeName' => 'Akan',
],
'sq' => [
'isoName' => 'Albanian',
'nativeName' => 'Shqip',
],
'am' => [
'isoName' => 'Amharic',
'nativeName' => 'አማርኛ',
],
'ar' => [
'isoName' => 'Arabic',
'nativeName' => 'العربية',
],
'an' => [
'isoName' => 'Aragonese',
'nativeName' => 'aragonés',
],
'hy' => [
'isoName' => 'Armenian',
'nativeName' => 'Հայերեն',
],
'as' => [
'isoName' => 'Assamese',
'nativeName' => 'অসমীয়া',
],
'av' => [
'isoName' => 'Avaric',
'nativeName' => 'авар мацӀ, магӀарул мацӀ',
],
'ae' => [
'isoName' => 'Avestan',
'nativeName' => 'avesta',
],
'ay' => [
'isoName' => 'Aymara',
'nativeName' => 'aymar aru',
],
'az' => [
'isoName' => 'Azerbaijani',
'nativeName' => 'azərbaycan dili',
],
'bm' => [
'isoName' => 'Bambara',
'nativeName' => 'bamanankan',
],
'ba' => [
'isoName' => 'Bashkir',
'nativeName' => 'башҡорт теле',
],
'eu' => [
'isoName' => 'Basque',
'nativeName' => 'euskara, euskera',
],
'be' => [
'isoName' => 'Belarusian',
'nativeName' => 'беларуская мова',
],
'bn' => [
'isoName' => 'Bengali',
'nativeName' => 'বাংলা',
],
'bh' => [
'isoName' => 'Bihari languages',
'nativeName' => 'भोजपुरी',
],
'bi' => [
'isoName' => 'Bislama',
'nativeName' => 'Bislama',
],
'bs' => [
'isoName' => 'Bosnian',
'nativeName' => 'bosanski jezik',
],
'br' => [
'isoName' => 'Breton',
'nativeName' => 'brezhoneg',
],
'bg' => [
'isoName' => 'Bulgarian',
'nativeName' => 'български език',
],
'my' => [
'isoName' => 'Burmese',
'nativeName' => 'ဗမာစာ',
],
'ca' => [
'isoName' => 'Catalan, Valencian',
'nativeName' => 'català, valencià',
],
'ch' => [
'isoName' => 'Chamorro',
'nativeName' => 'Chamoru',
],
'ce' => [
'isoName' => 'Chechen',
'nativeName' => 'нохчийн мотт',
],
'ny' => [
'isoName' => 'Chichewa, Chewa, Nyanja',
'nativeName' => 'chiCheŵa, chinyanja',
],
'zh' => [
'isoName' => 'Chinese',
'nativeName' => '中文 (Zhōngwén), 汉语, 漢語',
],
'cv' => [
'isoName' => 'Chuvash',
'nativeName' => 'чӑваш чӗлхи',
],
'kw' => [
'isoName' => 'Cornish',
'nativeName' => 'Kernewek',
],
'co' => [
'isoName' => 'Corsican',
'nativeName' => 'corsu, lingua corsa',
],
'cr' => [
'isoName' => 'Cree',
'nativeName' => 'ᓀᐦᐃᔭᐍᐏᐣ',
],
'hr' => [
'isoName' => 'Croatian',
'nativeName' => 'hrvatski jezik',
],
'cs' => [
'isoName' => 'Czech',
'nativeName' => 'čeština, český jazyk',
],
'da' => [
'isoName' => 'Danish',
'nativeName' => 'dansk',
],
'dv' => [
'isoName' => 'Divehi, Dhivehi, Maldivian',
'nativeName' => 'ދިވެހި',
],
'nl' => [
'isoName' => 'Dutch, Flemish',
'nativeName' => 'Nederlands, Vlaams',
],
'dz' => [
'isoName' => 'Dzongkha',
'nativeName' => 'རྫོང་ཁ',
],
'en' => [
'isoName' => 'English',
'nativeName' => 'English',
],
'eo' => [
'isoName' => 'Esperanto',
'nativeName' => 'Esperanto',
],
'et' => [
'isoName' => 'Estonian',
'nativeName' => 'eesti, eesti keel',
],
'ee' => [
'isoName' => 'Ewe',
'nativeName' => 'Eʋegbe',
],
'fo' => [
'isoName' => 'Faroese',
'nativeName' => 'føroyskt',
],
'fj' => [
'isoName' => 'Fijian',
'nativeName' => 'vosa Vakaviti',
],
'fi' => [
'isoName' => 'Finnish',
'nativeName' => 'suomi, suomen kieli',
],
'fr' => [
'isoName' => 'French',
'nativeName' => 'français',
],
'ff' => [
'isoName' => 'Fulah',
'nativeName' => 'Fulfulde, Pulaar, Pular',
],
'gl' => [
'isoName' => 'Galician',
'nativeName' => 'Galego',
],
'ka' => [
'isoName' => 'Georgian',
'nativeName' => 'ქართული',
],
'de' => [
'isoName' => 'German',
'nativeName' => 'Deutsch',
],
'el' => [
'isoName' => 'Greek (modern)',
'nativeName' => 'ελληνικά',
],
'gn' => [
'isoName' => 'Guaraní',
'nativeName' => 'Avañe\'ẽ',
],
'gu' => [
'isoName' => 'Gujarati',
'nativeName' => 'ગુજરાતી',
],
'ht' => [
'isoName' => 'Haitian, Haitian Creole',
'nativeName' => 'Kreyòl ayisyen',
],
'ha' => [
'isoName' => 'Hausa',
'nativeName' => '(Hausa) هَوُسَ',
],
'he' => [
'isoName' => 'Hebrew (modern)',
'nativeName' => 'עברית',
],
'hz' => [
'isoName' => 'Herero',
'nativeName' => 'Otjiherero',
],
'hi' => [
'isoName' => 'Hindi',
'nativeName' => 'हिन्दी, हिंदी',
],
'ho' => [
'isoName' => 'Hiri Motu',
'nativeName' => 'Hiri Motu',
],
'hu' => [
'isoName' => 'Hungarian',
'nativeName' => 'magyar',
],
'ia' => [
'isoName' => 'Interlingua',
'nativeName' => 'Interlingua',
],
'id' => [
'isoName' => 'Indonesian',
'nativeName' => 'Bahasa Indonesia',
],
'ie' => [
'isoName' => 'Interlingue',
'nativeName' => 'Originally called Occidental; then Interlingue after WWII',
],
'ga' => [
'isoName' => 'Irish',
'nativeName' => 'Gaeilge',
],
'ig' => [
'isoName' => 'Igbo',
'nativeName' => 'Asụsụ Igbo',
],
'ik' => [
'isoName' => 'Inupiaq',
'nativeName' => 'Iñupiaq, Iñupiatun',
],
'io' => [
'isoName' => 'Ido',
'nativeName' => 'Ido',
],
'is' => [
'isoName' => 'Icelandic',
'nativeName' => 'Íslenska',
],
'it' => [
'isoName' => 'Italian',
'nativeName' => 'Italiano',
],
'iu' => [
'isoName' => 'Inuktitut',
'nativeName' => 'ᐃᓄᒃᑎᑐᑦ',
],
'ja' => [
'isoName' => 'Japanese',
'nativeName' => '日本語 (にほんご)',
],
'jv' => [
'isoName' => 'Javanese',
'nativeName' => 'ꦧꦱꦗꦮ, Basa Jawa',
],
'kl' => [
'isoName' => 'Kalaallisut, Greenlandic',
'nativeName' => 'kalaallisut, kalaallit oqaasii',
],
'kn' => [
'isoName' => 'Kannada',
'nativeName' => 'ಕನ್ನಡ',
],
'kr' => [
'isoName' => 'Kanuri',
'nativeName' => 'Kanuri',
],
'ks' => [
'isoName' => 'Kashmiri',
'nativeName' => 'कश्मीरी, كشميري',
],
'kk' => [
'isoName' => 'Kazakh',
'nativeName' => 'қазақ тілі',
],
'km' => [
'isoName' => 'Central Khmer',
'nativeName' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ',
],
'ki' => [
'isoName' => 'Kikuyu, Gikuyu',
'nativeName' => 'Gĩkũyũ',
],
'rw' => [
'isoName' => 'Kinyarwanda',
'nativeName' => 'Ikinyarwanda',
],
'ky' => [
'isoName' => 'Kirghiz, Kyrgyz',
'nativeName' => 'Кыргызча, Кыргыз тили',
],
'kv' => [
'isoName' => 'Komi',
'nativeName' => 'коми кыв',
],
'kg' => [
'isoName' => 'Kongo',
'nativeName' => 'Kikongo',
],
'ko' => [
'isoName' => 'Korean',
'nativeName' => '한국어',
],
'ku' => [
'isoName' => 'Kurdish',
'nativeName' => 'Kurdî, کوردی',
],
'kj' => [
'isoName' => 'Kuanyama, Kwanyama',
'nativeName' => 'Kuanyama',
],
'la' => [
'isoName' => 'Latin',
'nativeName' => 'latine, lingua latina',
],
'lb' => [
'isoName' => 'Luxembourgish, Letzeburgesch',
'nativeName' => 'Lëtzebuergesch',
],
'lg' => [
'isoName' => 'Ganda',
'nativeName' => 'Luganda',
],
'li' => [
'isoName' => 'Limburgan, Limburger, Limburgish',
'nativeName' => 'Limburgs',
],
'ln' => [
'isoName' => 'Lingala',
'nativeName' => 'Lingála',
],
'lo' => [
'isoName' => 'Lao',
'nativeName' => 'ພາສາລາວ',
],
'lt' => [
'isoName' => 'Lithuanian',
'nativeName' => 'lietuvių kalba',
],
'lu' => [
'isoName' => 'Luba-Katanga',
'nativeName' => 'Kiluba',
],
'lv' => [
'isoName' => 'Latvian',
'nativeName' => 'latviešu valoda',
],
'gv' => [
'isoName' => 'Manx',
'nativeName' => 'Gaelg, Gailck',
],
'mk' => [
'isoName' => 'Macedonian',
'nativeName' => 'македонски јазик',
],
'mg' => [
'isoName' => 'Malagasy',
'nativeName' => 'fiteny malagasy',
],
'ms' => [
'isoName' => 'Malay',
'nativeName' => 'Bahasa Melayu, بهاس ملايو',
],
'ml' => [
'isoName' => 'Malayalam',
'nativeName' => 'മലയാളം',
],
'mt' => [
'isoName' => 'Maltese',
'nativeName' => 'Malti',
],
'mi' => [
'isoName' => 'Maori',
'nativeName' => 'te reo Māori',
],
'mr' => [
'isoName' => 'Marathi',
'nativeName' => 'मराठी',
],
'mh' => [
'isoName' => 'Marshallese',
'nativeName' => 'Kajin M̧ajeļ',
],
'mn' => [
'isoName' => 'Mongolian',
'nativeName' => 'Монгол хэл',
],
'na' => [
'isoName' => 'Nauru',
'nativeName' => 'Dorerin Naoero',
],
'nv' => [
'isoName' => 'Navajo, Navaho',
'nativeName' => 'Diné bizaad',
],
'nd' => [
'isoName' => 'North Ndebele',
'nativeName' => 'isiNdebele',
],
'ne' => [
'isoName' => 'Nepali',
'nativeName' => 'नेपाली',
],
'ng' => [
'isoName' => 'Ndonga',
'nativeName' => 'Owambo',
],
'nb' => [
'isoName' => 'Norwegian Bokmål',
'nativeName' => 'Norsk Bokmål',
],
'nn' => [
'isoName' => 'Norwegian Nynorsk',
'nativeName' => 'Norsk Nynorsk',
],
'no' => [
'isoName' => 'Norwegian',
'nativeName' => 'Norsk',
],
'ii' => [
'isoName' => 'Sichuan Yi, Nuosu',
'nativeName' => 'ꆈꌠ꒿ Nuosuhxop',
],
'nr' => [
'isoName' => 'South Ndebele',
'nativeName' => 'isiNdebele',
],
'oc' => [
'isoName' => 'Occitan',
'nativeName' => 'occitan, lenga d\'òc',
],
'oj' => [
'isoName' => 'Ojibwa',
'nativeName' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ',
],
'cu' => [
'isoName' => 'Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian',
'nativeName' => 'ѩзыкъ словѣньскъ',
],
'om' => [
'isoName' => 'Oromo',
'nativeName' => 'Afaan Oromoo',
],
'or' => [
'isoName' => 'Oriya',
'nativeName' => 'ଓଡ଼ିଆ',
],
'os' => [
'isoName' => 'Ossetian, Ossetic',
'nativeName' => 'ирон æвзаг',
],
'pa' => [
'isoName' => 'Panjabi, Punjabi',
'nativeName' => 'ਪੰਜਾਬੀ',
],
'pi' => [
'isoName' => 'Pali',
'nativeName' => 'पाऴि',
],
'fa' => [
'isoName' => 'Persian',
'nativeName' => 'فارسی',
],
'pl' => [
'isoName' => 'Polish',
'nativeName' => 'język polski, polszczyzna',
],
'ps' => [
'isoName' => 'Pashto, Pushto',
'nativeName' => 'پښتو',
],
'pt' => [
'isoName' => 'Portuguese',
'nativeName' => 'Português',
],
'qu' => [
'isoName' => 'Quechua',
'nativeName' => 'Runa Simi, Kichwa',
],
'rm' => [
'isoName' => 'Romansh',
'nativeName' => 'Rumantsch Grischun',
],
'rn' => [
'isoName' => 'Rundi',
'nativeName' => 'Ikirundi',
],
'ro' => [
'isoName' => 'Romanian, Moldavian, Moldovan',
'nativeName' => 'Română',
],
'ru' => [
'isoName' => 'Russian',
'nativeName' => 'русский',
],
'sa' => [
'isoName' => 'Sanskrit',
'nativeName' => 'संस्कृतम्',
],
'sc' => [
'isoName' => 'Sardinian',
'nativeName' => 'sardu',
],
'sd' => [
'isoName' => 'Sindhi',
'nativeName' => 'सिन्धी, سنڌي، سندھی',
],
'se' => [
'isoName' => 'Northern Sami',
'nativeName' => 'Davvisámegiella',
],
'sm' => [
'isoName' => 'Samoan',
'nativeName' => 'gagana fa\'a Samoa',
],
'sg' => [
'isoName' => 'Sango',
'nativeName' => 'yângâ tî sängö',
],
'sr' => [
'isoName' => 'Serbian',
'nativeName' => 'српски језик',
],
'gd' => [
'isoName' => 'Gaelic, Scottish Gaelic',
'nativeName' => 'Gàidhlig',
],
'sn' => [
'isoName' => 'Shona',
'nativeName' => 'chiShona',
],
'si' => [
'isoName' => 'Sinhala, Sinhalese',
'nativeName' => 'සිංහල',
],
'sk' => [
'isoName' => 'Slovak',
'nativeName' => 'Slovenčina, Slovenský Jazyk',
],
'sl' => [
'isoName' => 'Slovene',
'nativeName' => 'Slovenski Jezik, Slovenščina',
],
'so' => [
'isoName' => 'Somali',
'nativeName' => 'Soomaaliga, af Soomaali',
],
'st' => [
'isoName' => 'Southern Sotho',
'nativeName' => 'Sesotho',
],
'es' => [
'isoName' => 'Spanish, Castilian',
'nativeName' => 'Español',
],
'su' => [
'isoName' => 'Sundanese',
'nativeName' => 'Basa Sunda',
],
'sw' => [
'isoName' => 'Swahili',
'nativeName' => 'Kiswahili',
],
'ss' => [
'isoName' => 'Swati',
'nativeName' => 'SiSwati',
],
'sv' => [
'isoName' => 'Swedish',
'nativeName' => 'Svenska',
],
'ta' => [
'isoName' => 'Tamil',
'nativeName' => 'தமிழ்',
],
'te' => [
'isoName' => 'Telugu',
'nativeName' => 'తెలుగు',
],
'tg' => [
'isoName' => 'Tajik',
'nativeName' => 'тоҷикӣ, toçikī, تاجیکی',
],
'th' => [
'isoName' => 'Thai',
'nativeName' => 'ไทย',
],
'ti' => [
'isoName' => 'Tigrinya',
'nativeName' => 'ትግርኛ',
],
'bo' => [
'isoName' => 'Tibetan',
'nativeName' => 'བོད་ཡིག',
],
'tk' => [
'isoName' => 'Turkmen',
'nativeName' => 'Türkmen, Түркмен',
],
'tl' => [
'isoName' => 'Tagalog',
'nativeName' => 'Wikang Tagalog',
],
'tn' => [
'isoName' => 'Tswana',
'nativeName' => 'Setswana',
],
'to' => [
'isoName' => 'Tongan (Tonga Islands)',
'nativeName' => 'Faka Tonga',
],
'tr' => [
'isoName' => 'Turkish',
'nativeName' => 'Türkçe',
],
'ts' => [
'isoName' => 'Tsonga',
'nativeName' => 'Xitsonga',
],
'tt' => [
'isoName' => 'Tatar',
'nativeName' => 'татар теле, tatar tele',
],
'tw' => [
'isoName' => 'Twi',
'nativeName' => 'Twi',
],
'ty' => [
'isoName' => 'Tahitian',
'nativeName' => 'Reo Tahiti',
],
'ug' => [
'isoName' => 'Uighur, Uyghur',
'nativeName' => 'Uyƣurqə, ئۇيغۇرچ',
],
'uk' => [
'isoName' => 'Ukrainian',
'nativeName' => 'Українська',
],
'ur' => [
'isoName' => 'Urdu',
'nativeName' => 'اردو',
],
'uz' => [
'isoName' => 'Uzbek',
'nativeName' => 'Oʻzbek, Ўзбек, أۇزبېك',
],
've' => [
'isoName' => 'Venda',
'nativeName' => 'Tshivenḓa',
],
'vi' => [
'isoName' => 'Vietnamese',
'nativeName' => 'Tiếng Việt',
],
'vo' => [
'isoName' => 'Volapük',
'nativeName' => 'Volapük',
],
'wa' => [
'isoName' => 'Walloon',
'nativeName' => 'Walon',
],
'cy' => [
'isoName' => 'Welsh',
'nativeName' => 'Cymraeg',
],
'wo' => [
'isoName' => 'Wolof',
'nativeName' => 'Wollof',
],
'fy' => [
'isoName' => 'Western Frisian',
'nativeName' => 'Frysk',
],
'xh' => [
'isoName' => 'Xhosa',
'nativeName' => 'isiXhosa',
],
'yi' => [
'isoName' => 'Yiddish',
'nativeName' => 'ייִדיש',
],
'yo' => [
'isoName' => 'Yoruba',
'nativeName' => 'Yorùbá',
],
'za' => [
'isoName' => 'Zhuang, Chuang',
'nativeName' => 'Saɯ cueŋƅ, Saw cuengh',
],
'zu' => [
'isoName' => 'Zulu',
'nativeName' => 'isiZulu',
],
/*
* Add ISO 639-3 languages available in Carbon
*/
'agq' => [
'isoName' => 'Aghem',
'nativeName' => 'Aghem',
],
'agr' => [
'isoName' => 'Aguaruna',
'nativeName' => 'Aguaruna',
],
'anp' => [
'isoName' => 'Angika',
'nativeName' => 'Angika',
],
'asa' => [
'isoName' => 'Asu',
'nativeName' => 'Asu',
],
'ast' => [
'isoName' => 'Asturian',
'nativeName' => 'Asturian',
],
'ayc' => [
'isoName' => 'Southern Aymara',
'nativeName' => 'Southern Aymara',
],
'bas' => [
'isoName' => 'Basaa',
'nativeName' => 'Basaa',
],
'bem' => [
'isoName' => 'Bemba',
'nativeName' => 'Bemba',
],
'bez' => [
'isoName' => 'Bena',
'nativeName' => 'Bena',
],
'bhb' => [
'isoName' => 'Bhili',
'nativeName' => 'Bhili',
],
'bho' => [
'isoName' => 'Bhojpuri',
'nativeName' => 'Bhojpuri',
],
'brx' => [
'isoName' => 'Bodo',
'nativeName' => 'Bodo',
],
'byn' => [
'isoName' => 'Bilin',
'nativeName' => 'Bilin',
],
'ccp' => [
'isoName' => 'Chakma',
'nativeName' => 'Chakma',
],
'cgg' => [
'isoName' => 'Chiga',
'nativeName' => 'Chiga',
],
'chr' => [
'isoName' => 'Cherokee',
'nativeName' => 'Cherokee',
],
'cmn' => [
'isoName' => 'Chinese',
'nativeName' => 'Chinese',
],
'crh' => [
'isoName' => 'Crimean Turkish',
'nativeName' => 'Crimean Turkish',
],
'csb' => [
'isoName' => 'Kashubian',
'nativeName' => 'Kashubian',
],
'dav' => [
'isoName' => 'Taita',
'nativeName' => 'Taita',
],
'dje' => [
'isoName' => 'Zarma',
'nativeName' => 'Zarma',
],
'doi' => [
'isoName' => 'Dogri (macrolanguage)',
'nativeName' => 'Dogri (macrolanguage)',
],
'dsb' => [
'isoName' => 'Lower Sorbian',
'nativeName' => 'Lower Sorbian',
],
'dua' => [
'isoName' => 'Duala',
'nativeName' => 'Duala',
],
'dyo' => [
'isoName' => 'Jola-Fonyi',
'nativeName' => 'Jola-Fonyi',
],
'ebu' => [
'isoName' => 'Embu',
'nativeName' => 'Embu',
],
'ewo' => [
'isoName' => 'Ewondo',
'nativeName' => 'Ewondo',
],
'fil' => [
'isoName' => 'Filipino',
'nativeName' => 'Filipino',
],
'fur' => [
'isoName' => 'Friulian',
'nativeName' => 'Friulian',
],
'gez' => [
'isoName' => 'Geez',
'nativeName' => 'Geez',
],
'gom' => [
'isoName' => 'Konkani, Goan',
'nativeName' => 'ಕೊಂಕಣಿ',
],
'gsw' => [
'isoName' => 'Swiss German',
'nativeName' => 'Swiss German',
],
'guz' => [
'isoName' => 'Gusii',
'nativeName' => 'Gusii',
],
'hak' => [
'isoName' => 'Hakka Chinese',
'nativeName' => 'Hakka Chinese',
],
'haw' => [
'isoName' => 'Hawaiian',
'nativeName' => 'Hawaiian',
],
'hif' => [
'isoName' => 'Fiji Hindi',
'nativeName' => 'Fiji Hindi',
],
'hne' => [
'isoName' => 'Chhattisgarhi',
'nativeName' => 'Chhattisgarhi',
],
'hsb' => [
'isoName' => 'Upper Sorbian',
'nativeName' => 'Upper Sorbian',
],
'jgo' => [
'isoName' => 'Ngomba',
'nativeName' => 'Ngomba',
],
'jmc' => [
'isoName' => 'Machame',
'nativeName' => 'Machame',
],
'kab' => [
'isoName' => 'Kabyle',
'nativeName' => 'Kabyle',
],
'kam' => [
'isoName' => 'Kamba',
'nativeName' => 'Kamba',
],
'kde' => [
'isoName' => 'Makonde',
'nativeName' => 'Makonde',
],
'kea' => [
'isoName' => 'Kabuverdianu',
'nativeName' => 'Kabuverdianu',
],
'khq' => [
'isoName' => 'Koyra Chiini',
'nativeName' => 'Koyra Chiini',
],
'kkj' => [
'isoName' => 'Kako',
'nativeName' => 'Kako',
],
'kln' => [
'isoName' => 'Kalenjin',
'nativeName' => 'Kalenjin',
],
'kok' => [
'isoName' => 'Konkani',
'nativeName' => 'Konkani',
],
'ksb' => [
'isoName' => 'Shambala',
'nativeName' => 'Shambala',
],
'ksf' => [
'isoName' => 'Bafia',
'nativeName' => 'Bafia',
],
'ksh' => [
'isoName' => 'Colognian',
'nativeName' => 'Colognian',
],
'lag' => [
'isoName' => 'Langi',
'nativeName' => 'Langi',
],
'lij' => [
'isoName' => 'Ligurian',
'nativeName' => 'Ligurian',
],
'lkt' => [
'isoName' => 'Lakota',
'nativeName' => 'Lakota',
],
'lrc' => [
'isoName' => 'Northern Luri',
'nativeName' => 'Northern Luri',
],
'luo' => [
'isoName' => 'Luo',
'nativeName' => 'Luo',
],
'luy' => [
'isoName' => 'Luyia',
'nativeName' => 'Luyia',
],
'lzh' => [
'isoName' => 'Literary Chinese',
'nativeName' => 'Literary Chinese',
],
'mag' => [
'isoName' => 'Magahi',
'nativeName' => 'Magahi',
],
'mai' => [
'isoName' => 'Maithili',
'nativeName' => 'Maithili',
],
'mas' => [
'isoName' => 'Masai',
'nativeName' => 'Masai',
],
'mer' => [
'isoName' => 'Meru',
'nativeName' => 'Meru',
],
'mfe' => [
'isoName' => 'Morisyen',
'nativeName' => 'Morisyen',
],
'mgh' => [
'isoName' => 'Makhuwa-Meetto',
'nativeName' => 'Makhuwa-Meetto',
],
'mgo' => [
'isoName' => 'Metaʼ',
'nativeName' => 'Metaʼ',
],
'mhr' => [
'isoName' => 'Eastern Mari',
'nativeName' => 'Eastern Mari',
],
'miq' => [
'isoName' => 'Mískito',
'nativeName' => 'Mískito',
],
'mjw' => [
'isoName' => 'Karbi',
'nativeName' => 'Karbi',
],
'mni' => [
'isoName' => 'Manipuri',
'nativeName' => 'Manipuri',
],
'mua' => [
'isoName' => 'Mundang',
'nativeName' => 'Mundang',
],
'mzn' => [
'isoName' => 'Mazanderani',
'nativeName' => 'Mazanderani',
],
'nan' => [
'isoName' => 'Min Nan Chinese',
'nativeName' => 'Min Nan Chinese',
],
'naq' => [
'isoName' => 'Nama',
'nativeName' => 'Nama',
],
'nds' => [
'isoName' => 'Low German',
'nativeName' => 'Low German',
],
'nhn' => [
'isoName' => 'Central Nahuatl',
'nativeName' => 'Central Nahuatl',
],
'niu' => [
'isoName' => 'Niuean',
'nativeName' => 'Niuean',
],
'nmg' => [
'isoName' => 'Kwasio',
'nativeName' => 'Kwasio',
],
'nnh' => [
'isoName' => 'Ngiemboon',
'nativeName' => 'Ngiemboon',
],
'nso' => [
'isoName' => 'Northern Sotho',
'nativeName' => 'Northern Sotho',
],
'nus' => [
'isoName' => 'Nuer',
'nativeName' => 'Nuer',
],
'nyn' => [
'isoName' => 'Nyankole',
'nativeName' => 'Nyankole',
],
'pap' => [
'isoName' => 'Papiamento',
'nativeName' => 'Papiamento',
],
'prg' => [
'isoName' => 'Prussian',
'nativeName' => 'Prussian',
],
'quz' => [
'isoName' => 'Cusco Quechua',
'nativeName' => 'Cusco Quechua',
],
'raj' => [
'isoName' => 'Rajasthani',
'nativeName' => 'Rajasthani',
],
'rof' => [
'isoName' => 'Rombo',
'nativeName' => 'Rombo',
],
'rwk' => [
'isoName' => 'Rwa',
'nativeName' => 'Rwa',
],
'sah' => [
'isoName' => 'Sakha',
'nativeName' => 'Sakha',
],
'saq' => [
'isoName' => 'Samburu',
'nativeName' => 'Samburu',
],
'sat' => [
'isoName' => 'Santali',
'nativeName' => 'Santali',
],
'sbp' => [
'isoName' => 'Sangu',
'nativeName' => 'Sangu',
],
'scr' => [
'isoName' => 'Serbo Croatian',
'nativeName' => 'Serbo Croatian',
],
'seh' => [
'isoName' => 'Sena',
'nativeName' => 'Sena',
],
'ses' => [
'isoName' => 'Koyraboro Senni',
'nativeName' => 'Koyraboro Senni',
],
'sgs' => [
'isoName' => 'Samogitian',
'nativeName' => 'Samogitian',
],
'shi' => [
'isoName' => 'Tachelhit',
'nativeName' => 'Tachelhit',
],
'shn' => [
'isoName' => 'Shan',
'nativeName' => 'Shan',
],
'shs' => [
'isoName' => 'Shuswap',
'nativeName' => 'Shuswap',
],
'sid' => [
'isoName' => 'Sidamo',
'nativeName' => 'Sidamo',
],
'smn' => [
'isoName' => 'Inari Sami',
'nativeName' => 'Inari Sami',
],
'szl' => [
'isoName' => 'Silesian',
'nativeName' => 'Silesian',
],
'tcy' => [
'isoName' => 'Tulu',
'nativeName' => 'Tulu',
],
'teo' => [
'isoName' => 'Teso',
'nativeName' => 'Teso',
],
'tet' => [
'isoName' => 'Tetum',
'nativeName' => 'Tetum',
],
'the' => [
'isoName' => 'Chitwania Tharu',
'nativeName' => 'Chitwania Tharu',
],
'tig' => [
'isoName' => 'Tigre',
'nativeName' => 'Tigre',
],
'tlh' => [
'isoName' => 'Klingon',
'nativeName' => 'tlhIngan Hol',
],
'tpi' => [
'isoName' => 'Tok Pisin',
'nativeName' => 'Tok Pisin',
],
'twq' => [
'isoName' => 'Tasawaq',
'nativeName' => 'Tasawaq',
],
'tzl' => [
'isoName' => 'Talossan',
'nativeName' => 'Talossan',
],
'tzm' => [
'isoName' => 'Tamazight, Central Atlas',
'nativeName' => 'ⵜⵎⴰⵣⵉⵖⵜ',
],
'unm' => [
'isoName' => 'Unami',
'nativeName' => 'Unami',
],
'vai' => [
'isoName' => 'Vai',
'nativeName' => 'Vai',
],
'vun' => [
'isoName' => 'Vunjo',
'nativeName' => 'Vunjo',
],
'wae' => [
'isoName' => 'Walser',
'nativeName' => 'Walser',
],
'wal' => [
'isoName' => 'Wolaytta',
'nativeName' => 'Wolaytta',
],
'xog' => [
'isoName' => 'Soga',
'nativeName' => 'Soga',
],
'yav' => [
'isoName' => 'Yangben',
'nativeName' => 'Yangben',
],
'yue' => [
'isoName' => 'Cantonese',
'nativeName' => 'Cantonese',
],
'yuw' => [
'isoName' => 'Yau (Morobe Province)',
'nativeName' => 'Yau (Morobe Province)',
],
'zgh' => [
'isoName' => 'Standard Moroccan Tamazight',
'nativeName' => 'Standard Moroccan Tamazight',
],
];
<?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.
*/
/*
* ISO 3166-2
*/
return [
'AD' => 'Andorra',
'AE' => 'United Arab Emirates',
'AF' => 'Afghanistan',
'AG' => 'Antigua and Barbuda',
'AI' => 'Anguilla',
'AL' => 'Albania',
'AM' => 'Armenia',
'AO' => 'Angola',
'AQ' => 'Antarctica',
'AR' => 'Argentina',
'AS' => 'American Samoa',
'AT' => 'Austria',
'AU' => 'Australia',
'AW' => 'Aruba',
'AX' => 'Åland Islands',
'AZ' => 'Azerbaijan',
'BA' => 'Bosnia and Herzegovina',
'BB' => 'Barbados',
'BD' => 'Bangladesh',
'BE' => 'Belgium',
'BF' => 'Burkina Faso',
'BG' => 'Bulgaria',
'BH' => 'Bahrain',
'BI' => 'Burundi',
'BJ' => 'Benin',
'BL' => 'Saint Barthélemy',
'BM' => 'Bermuda',
'BN' => 'Brunei Darussalam',
'BO' => 'Bolivia (Plurinational State of)',
'BQ' => 'Bonaire, Sint Eustatius and Saba',
'BR' => 'Brazil',
'BS' => 'Bahamas',
'BT' => 'Bhutan',
'BV' => 'Bouvet Island',
'BW' => 'Botswana',
'BY' => 'Belarus',
'BZ' => 'Belize',
'CA' => 'Canada',
'CC' => 'Cocos (Keeling) Islands',
'CD' => 'Congo, Democratic Republic of the',
'CF' => 'Central African Republic',
'CG' => 'Congo',
'CH' => 'Switzerland',
'CI' => 'Côte d\'Ivoire',
'CK' => 'Cook Islands',
'CL' => 'Chile',
'CM' => 'Cameroon',
'CN' => 'China',
'CO' => 'Colombia',
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CV' => 'Cabo Verde',
'CW' => 'Curaçao',
'CX' => 'Christmas Island',
'CY' => 'Cyprus',
'CZ' => 'Czechia',
'DE' => 'Germany',
'DJ' => 'Djibouti',
'DK' => 'Denmark',
'DM' => 'Dominica',
'DO' => 'Dominican Republic',
'DZ' => 'Algeria',
'EC' => 'Ecuador',
'EE' => 'Estonia',
'EG' => 'Egypt',
'EH' => 'Western Sahara',
'ER' => 'Eritrea',
'ES' => 'Spain',
'ET' => 'Ethiopia',
'FI' => 'Finland',
'FJ' => 'Fiji',
'FK' => 'Falkland Islands (Malvinas)',
'FM' => 'Micronesia (Federated States of)',
'FO' => 'Faroe Islands',
'FR' => 'France',
'GA' => 'Gabon',
'GB' => 'United Kingdom of Great Britain and Northern Ireland',
'GD' => 'Grenada',
'GE' => 'Georgia',
'GF' => 'French Guiana',
'GG' => 'Guernsey',
'GH' => 'Ghana',
'GI' => 'Gibraltar',
'GL' => 'Greenland',
'GM' => 'Gambia',
'GN' => 'Guinea',
'GP' => 'Guadeloupe',
'GQ' => 'Equatorial Guinea',
'GR' => 'Greece',
'GS' => 'South Georgia and the South Sandwich Islands',
'GT' => 'Guatemala',
'GU' => 'Guam',
'GW' => 'Guinea-Bissau',
'GY' => 'Guyana',
'HK' => 'Hong Kong',
'HM' => 'Heard Island and McDonald Islands',
'HN' => 'Honduras',
'HR' => 'Croatia',
'HT' => 'Haiti',
'HU' => 'Hungary',
'ID' => 'Indonesia',
'IE' => 'Ireland',
'IL' => 'Israel',
'IM' => 'Isle of Man',
'IN' => 'India',
'IO' => 'British Indian Ocean Territory',
'IQ' => 'Iraq',
'IR' => 'Iran (Islamic Republic of)',
'IS' => 'Iceland',
'IT' => 'Italy',
'JE' => 'Jersey',
'JM' => 'Jamaica',
'JO' => 'Jordan',
'JP' => 'Japan',
'KE' => 'Kenya',
'KG' => 'Kyrgyzstan',
'KH' => 'Cambodia',
'KI' => 'Kiribati',
'KM' => 'Comoros',
'KN' => 'Saint Kitts and Nevis',
'KP' => 'Korea (Democratic People\'s Republic of)',
'KR' => 'Korea, Republic of',
'KW' => 'Kuwait',
'KY' => 'Cayman Islands',
'KZ' => 'Kazakhstan',
'LA' => 'Lao People\'s Democratic Republic',
'LB' => 'Lebanon',
'LC' => 'Saint Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LR' => 'Liberia',
'LS' => 'Lesotho',
'LT' => 'Lithuania',
'LU' => 'Luxembourg',
'LV' => 'Latvia',
'LY' => 'Libya',
'MA' => 'Morocco',
'MC' => 'Monaco',
'MD' => 'Moldova, Republic of',
'ME' => 'Montenegro',
'MF' => 'Saint Martin (French part)',
'MG' => 'Madagascar',
'MH' => 'Marshall Islands',
'MK' => 'Macedonia, the former Yugoslav Republic of',
'ML' => 'Mali',
'MM' => 'Myanmar',
'MN' => 'Mongolia',
'MO' => 'Macao',
'MP' => 'Northern Mariana Islands',
'MQ' => 'Martinique',
'MR' => 'Mauritania',
'MS' => 'Montserrat',
'MT' => 'Malta',
'MU' => 'Mauritius',
'MV' => 'Maldives',
'MW' => 'Malawi',
'MX' => 'Mexico',
'MY' => 'Malaysia',
'MZ' => 'Mozambique',
'NA' => 'Namibia',
'NC' => 'New Caledonia',
'NE' => 'Niger',
'NF' => 'Norfolk Island',
'NG' => 'Nigeria',
'NI' => 'Nicaragua',
'NL' => 'Netherlands',
'NO' => 'Norway',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NU' => 'Niue',
'NZ' => 'New Zealand',
'OM' => 'Oman',
'PA' => 'Panama',
'PE' => 'Peru',
'PF' => 'French Polynesia',
'PG' => 'Papua New Guinea',
'PH' => 'Philippines',
'PK' => 'Pakistan',
'PL' => 'Poland',
'PM' => 'Saint Pierre and Miquelon',
'PN' => 'Pitcairn',
'PR' => 'Puerto Rico',
'PS' => 'Palestine, State of',
'PT' => 'Portugal',
'PW' => 'Palau',
'PY' => 'Paraguay',
'QA' => 'Qatar',
'RE' => 'Réunion',
'RO' => 'Romania',
'RS' => 'Serbia',
'RU' => 'Russian Federation',
'RW' => 'Rwanda',
'SA' => 'Saudi Arabia',
'SB' => 'Solomon Islands',
'SC' => 'Seychelles',
'SD' => 'Sudan',
'SE' => 'Sweden',
'SG' => 'Singapore',
'SH' => 'Saint Helena, Ascension and Tristan da Cunha',
'SI' => 'Slovenia',
'SJ' => 'Svalbard and Jan Mayen',
'SK' => 'Slovakia',
'SL' => 'Sierra Leone',
'SM' => 'San Marino',
'SN' => 'Senegal',
'SO' => 'Somalia',
'SR' => 'Suriname',
'SS' => 'South Sudan',
'ST' => 'Sao Tome and Principe',
'SV' => 'El Salvador',
'SX' => 'Sint Maarten (Dutch part)',
'SY' => 'Syrian Arab Republic',
'SZ' => 'Eswatini',
'TC' => 'Turks and Caicos Islands',
'TD' => 'Chad',
'TF' => 'French Southern Territories',
'TG' => 'Togo',
'TH' => 'Thailand',
'TJ' => 'Tajikistan',
'TK' => 'Tokelau',
'TL' => 'Timor-Leste',
'TM' => 'Turkmenistan',
'TN' => 'Tunisia',
'TO' => 'Tonga',
'TR' => 'Turkey',
'TT' => 'Trinidad and Tobago',
'TV' => 'Tuvalu',
'TW' => 'Taiwan, Province of China',
'TZ' => 'Tanzania, United Republic of',
'UA' => 'Ukraine',
'UG' => 'Uganda',
'UM' => 'United States Minor Outlying Islands',
'US' => 'United States of America',
'UY' => 'Uruguay',
'UZ' => 'Uzbekistan',
'VA' => 'Holy See',
'VC' => 'Saint Vincent and the Grenadines',
'VE' => 'Venezuela (Bolivarian Republic of)',
'VG' => 'Virgin Islands (British)',
'VI' => 'Virgin Islands (U.S.)',
'VN' => 'Viet Nam',
'VU' => 'Vanuatu',
'WF' => 'Wallis and Futuna',
'WS' => 'Samoa',
'YE' => 'Yemen',
'YT' => 'Mayotte',
'ZA' => 'South Africa',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
];
<?php
declare(strict_types=1);
namespace Carbon\PHPStan;
use Closure;
use PHPStan\Reflection\Php\BuiltinMethodReflection;
use PHPStan\TrinaryLogic;
use ReflectionClass;
use ReflectionFunction;
use ReflectionMethod;
use ReflectionParameter;
use ReflectionType;
use stdClass;
use Throwable;
final class Macro implements BuiltinMethodReflection
{
/**
* The class name.
*
* @var class-string
*/
private $className;
/**
* The method name.
*
* @var string
*/
private $methodName;
/**
* The reflection function/method.
*
* @var ReflectionFunction|ReflectionMethod
*/
private $reflectionFunction;
/**
* The parameters.
*
* @var ReflectionParameter[]
*/
private $parameters;
/**
* The is static.
*
* @var bool
*/
private $static = false;
/**
* Macro constructor.
*
* @param string $className
* @phpstan-param class-string $className
*
* @param string $methodName
* @param callable $macro
*/
public function __construct(string $className, string $methodName, $macro)
{
$this->className = $className;
$this->methodName = $methodName;
$this->reflectionFunction = \is_array($macro)
? new ReflectionMethod($macro[0], $macro[1])
: new ReflectionFunction($macro);
$this->parameters = $this->reflectionFunction->getParameters();
if ($this->reflectionFunction->isClosure()) {
try {
/** @var Closure $closure */
$closure = $this->reflectionFunction->getClosure();
$boundClosure = Closure::bind($closure, new stdClass);
$this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null);
} catch (Throwable $e) {
$this->static = true;
}
}
}
/**
* {@inheritdoc}
*/
public function getDeclaringClass(): ReflectionClass
{
return new ReflectionClass($this->className);
}
/**
* {@inheritdoc}
*/
public function isPrivate(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function isPublic(): bool
{
return true;
}
/**
* {@inheritdoc}
*/
public function isFinal(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function isInternal(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function isAbstract(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function isStatic(): bool
{
return $this->static;
}
/**
* {@inheritdoc}
*/
public function getDocComment(): ?string
{
return $this->reflectionFunction->getDocComment() ?: null;
}
/**
* {@inheritdoc}
*/
public function getFileName()
{
return $this->reflectionFunction->getFileName();
}
/**
* {@inheritdoc}
*/
public function getName(): string
{
return $this->methodName;
}
/**
* {@inheritdoc}
*/
public function getParameters(): array
{
return $this->parameters;
}
/**
* {@inheritdoc}
*/
public function getReturnType(): ?ReflectionType
{
return $this->reflectionFunction->getReturnType();
}
/**
* {@inheritdoc}
*/
public function getStartLine()
{
return $this->reflectionFunction->getStartLine();
}
/**
* {@inheritdoc}
*/
public function getEndLine()
{
return $this->reflectionFunction->getEndLine();
}
/**
* {@inheritdoc}
*/
public function isDeprecated(): TrinaryLogic
{
return TrinaryLogic::createFromBoolean(
$this->reflectionFunction->isDeprecated() ||
preg_match('/@deprecated/i', $this->getDocComment() ?: '')
);
}
/**
* {@inheritdoc}
*/
public function isVariadic(): bool
{
return $this->reflectionFunction->isVariadic();
}
/**
* {@inheritdoc}
*/
public function getPrototype(): BuiltinMethodReflection
{
return $this;
}
/**
* {@inheritdoc}
*/
public function getReflection(): ?ReflectionMethod
{
return $this->reflectionFunction instanceof ReflectionMethod
? $this->reflectionFunction
: null;
}
}
<?php
namespace Carbon\PHPStan;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
use PHPStan\Reflection\Php\PhpMethodReflectionFactory;
use PHPStan\Type\TypehintHelper;
/**
* Class MacroExtension.
*
* @codeCoverageIgnore Pure PHPStan wrapper.
*/
final class MacroExtension implements MethodsClassReflectionExtension
{
/**
* @var PhpMethodReflectionFactory
*/
protected $methodReflectionFactory;
/**
* @var MacroScanner
*/
protected $scanner;
/**
* Extension constructor.
*
* @param PhpMethodReflectionFactory $methodReflectionFactory
*/
public function __construct(PhpMethodReflectionFactory $methodReflectionFactory)
{
$this->scanner = new MacroScanner();
$this->methodReflectionFactory = $methodReflectionFactory;
}
/**
* {@inheritdoc}
*/
public function hasMethod(ClassReflection $classReflection, string $methodName): bool
{
return $this->scanner->hasMethod($classReflection->getName(), $methodName);
}
/**
* {@inheritdoc}
*/
public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection
{
$builtinMacro = $this->scanner->getMethod($classReflection->getName(), $methodName);
return $this->methodReflectionFactory->create(
$classReflection,
null,
$builtinMacro,
$classReflection->getActiveTemplateTypeMap(),
[],
TypehintHelper::decideTypeFromReflection($builtinMacro->getReturnType()),
null,
null,
$builtinMacro->isDeprecated()->yes(),
$builtinMacro->isInternal(),
$builtinMacro->isFinal(),
$builtinMacro->getDocComment()
);
}
}
<?php
namespace Carbon\PHPStan;
use Carbon\CarbonInterface;
use ReflectionClass;
use ReflectionException;
final class MacroScanner
{
/**
* Return true if the given pair class-method is a Carbon macro.
*
* @param string $className
* @phpstan-param class-string $className
*
* @param string $methodName
*
* @return bool
*/
public function hasMethod(string $className, string $methodName): bool
{
return is_a($className, CarbonInterface::class, true) &&
\is_callable([$className, 'hasMacro']) &&
$className::hasMacro($methodName);
}
/**
* Return the Macro for a given pair class-method.
*
* @param string $className
* @phpstan-param class-string $className
*
* @param string $methodName
*
* @throws ReflectionException
*
* @return Macro
*/
public function getMethod(string $className, string $methodName): Macro
{
$reflectionClass = new ReflectionClass($className);
$property = $reflectionClass->getProperty('globalMacros');
$property->setAccessible(true);
$macro = $property->getValue()[$methodName];
return new Macro(
$className,
$methodName,
$macro
);
}
}