first upload all files
This commit is contained in:
90
Modules/Support/Country.php
Normal file
90
Modules/Support/Country.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support;
|
||||
|
||||
class Country
|
||||
{
|
||||
/**
|
||||
* Path of the resource.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const RESOURCE_PATH = __DIR__ . '/Resources/countries.php';
|
||||
|
||||
/**
|
||||
* Array of all countries.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $countries;
|
||||
|
||||
/**
|
||||
* Array of supported countries by the app.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $supported;
|
||||
|
||||
/**
|
||||
* Get all countries.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function all()
|
||||
{
|
||||
if (is_null(self::$countries)) {
|
||||
self::$countries = require self::RESOURCE_PATH;
|
||||
}
|
||||
|
||||
return self::$countries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all supported countries.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function supported()
|
||||
{
|
||||
if (! is_null(self::$supported)) {
|
||||
return self::$supported;
|
||||
}
|
||||
|
||||
$supportedCountries = setting('supported_countries');
|
||||
|
||||
return self::$supported = array_filter(static::all(), function ($code) use ($supportedCountries) {
|
||||
return in_array($code, $supportedCountries);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all country codes.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function codes()
|
||||
{
|
||||
return array_keys(self::all());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get supported country codes.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function supportedCodes()
|
||||
{
|
||||
return array_keys(self::supported());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name of the given country code.
|
||||
*
|
||||
* @param string $code
|
||||
* @return string
|
||||
*/
|
||||
public static function name($code)
|
||||
{
|
||||
return array_get(self::all(), $code);
|
||||
}
|
||||
}
|
||||
54
Modules/Support/Eloquent/Model.php
Normal file
54
Modules/Support/Eloquent/Model.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Eloquent;
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
abstract class Model extends Eloquent
|
||||
{
|
||||
/**
|
||||
* Perform any actions required before the model boots.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function booting()
|
||||
{
|
||||
static::saved(function ($entity) {
|
||||
$entity->clearEntityTaggedCache();
|
||||
});
|
||||
|
||||
static::deleted(function ($entity) {
|
||||
$entity->clearEntityTaggedCache();
|
||||
});
|
||||
}
|
||||
|
||||
public static function queryWithoutEagerRelations()
|
||||
{
|
||||
return (new static)->newQueryWithoutEagerRelations();
|
||||
}
|
||||
|
||||
public function newQueryWithoutEagerRelations()
|
||||
{
|
||||
return $this->registerGlobalScopes(
|
||||
$this->newModelQuery()->withCount($this->withCount)
|
||||
);
|
||||
}
|
||||
|
||||
public function clearEntityTaggedCache()
|
||||
{
|
||||
Cache::tags($this->getTable())->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a new active global scope on the model.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function addActiveGlobalScope()
|
||||
{
|
||||
static::addGlobalScope('active', function ($query) {
|
||||
$query->where('is_active', true);
|
||||
});
|
||||
}
|
||||
}
|
||||
58
Modules/Support/Eloquent/Sluggable.php
Normal file
58
Modules/Support/Eloquent/Sluggable.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
trait Sluggable
|
||||
{
|
||||
/**
|
||||
* Boot the trait.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function bootSluggable()
|
||||
{
|
||||
static::creating(function ($entity) {
|
||||
$entity->setSlug();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the slug attribute.
|
||||
*
|
||||
* @param string $value
|
||||
* @return void
|
||||
*/
|
||||
public function setSlug($value = null)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
$value = $this->getAttribute($this->slugAttribute);
|
||||
}
|
||||
|
||||
$this->attributes['slug'] = $this->generateSlug($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate slug by the given value.
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
private function generateSlug($value)
|
||||
{
|
||||
$slug = str_slug($value) ?: slugify($value);
|
||||
|
||||
$query = $this->where('slug', $slug)->withoutGlobalScope('active');
|
||||
|
||||
if (array_has(class_uses($this), SoftDeletes::class)) {
|
||||
$query->withTrashed();
|
||||
}
|
||||
|
||||
if ($query->exists()) {
|
||||
$slug .= '-' . str_random(8);
|
||||
}
|
||||
|
||||
return $slug;
|
||||
}
|
||||
}
|
||||
44
Modules/Support/Eloquent/Translatable.php
Normal file
44
Modules/Support/Eloquent/Translatable.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Eloquent;
|
||||
|
||||
use Astrotomic\Translatable\Translatable as AstrotomicTranslatable;
|
||||
|
||||
trait Translatable
|
||||
{
|
||||
use AstrotomicTranslatable;
|
||||
|
||||
/**
|
||||
* Save the model to the database.
|
||||
*
|
||||
* @param array $options
|
||||
* @return bool
|
||||
*/
|
||||
public function save(array $options = [])
|
||||
{
|
||||
if (parent::save($options)) {
|
||||
return $this->saveTranslations();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This scope filters results by checking the translation fields.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param string $key
|
||||
* @param array $values
|
||||
* @param string $locale
|
||||
* @return \Illuminate\Database\Eloquent\Builder|static
|
||||
*/
|
||||
public function scopeWhereTranslationIn($query, $key, array $values, $locale = null)
|
||||
{
|
||||
return $query->whereHas('translations', function ($query) use ($key, $values, $locale) {
|
||||
$query->whereIn($key, $values)
|
||||
->when(! is_null($locale), function ($query) use ($locale) {
|
||||
$query->where('locale', $locale);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
27
Modules/Support/Eloquent/TranslationModel.php
Normal file
27
Modules/Support/Eloquent/TranslationModel.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
abstract class TranslationModel extends Model
|
||||
{
|
||||
/**
|
||||
* Indicates if the model should be timestamped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Perform any actions required before the model boots.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function booting()
|
||||
{
|
||||
static::addGlobalScope('locale', function ($query) {
|
||||
$query->whereIn('locale', [locale(), config('app.fallback_locale')]);
|
||||
});
|
||||
}
|
||||
}
|
||||
21
Modules/Support/Http/Controllers/CountryStateController.php
Normal file
21
Modules/Support/Http/Controllers/CountryStateController.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Http\Controllers;
|
||||
|
||||
use Modules\Support\State;
|
||||
|
||||
class CountryStateController
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param string $countryCode
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index($countryCode)
|
||||
{
|
||||
$states = State::get($countryCode);
|
||||
|
||||
return response()->json($states);
|
||||
}
|
||||
}
|
||||
55
Modules/Support/Locale.php
Normal file
55
Modules/Support/Locale.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support;
|
||||
|
||||
class Locale
|
||||
{
|
||||
/**
|
||||
* Path of the resource.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const RESOURCE_PATH = __DIR__ . '/Resources/locales.php';
|
||||
|
||||
/**
|
||||
* Array of all locales.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $locales;
|
||||
|
||||
/**
|
||||
* Get all locales.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function all()
|
||||
{
|
||||
if (is_null(self::$locales)) {
|
||||
self::$locales = require self::RESOURCE_PATH;
|
||||
}
|
||||
|
||||
return self::$locales;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all locale codes.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function codes()
|
||||
{
|
||||
return array_keys(static::all());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name of the given locale code.
|
||||
*
|
||||
* @param string $code
|
||||
* @return string
|
||||
*/
|
||||
public static function name($code)
|
||||
{
|
||||
return array_get(static::all(), $code);
|
||||
}
|
||||
}
|
||||
45
Modules/Support/Manager.php
Normal file
45
Modules/Support/Manager.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support;
|
||||
|
||||
abstract class Manager
|
||||
{
|
||||
private $drivers = [];
|
||||
|
||||
public function all()
|
||||
{
|
||||
return collect($this->drivers);
|
||||
}
|
||||
|
||||
public function names()
|
||||
{
|
||||
return array_keys($this->drivers);
|
||||
}
|
||||
|
||||
public function get($name)
|
||||
{
|
||||
return array_get($this->drivers, $name);
|
||||
}
|
||||
|
||||
public function register($name, $driver)
|
||||
{
|
||||
$this->drivers[$name] = is_callable($driver) ? call_user_func($driver) : $driver;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->drivers);
|
||||
}
|
||||
|
||||
public function isEmpty()
|
||||
{
|
||||
return empty($this->drivers);
|
||||
}
|
||||
|
||||
public function isNotEmpty()
|
||||
{
|
||||
return ! $this->isEmpty();
|
||||
}
|
||||
}
|
||||
220
Modules/Support/Money.php
Normal file
220
Modules/Support/Money.php
Normal file
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support;
|
||||
|
||||
use NumberFormatter;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use Modules\Currency\Currency;
|
||||
use Modules\Currency\Entities\CurrencyRate;
|
||||
|
||||
class Money implements JsonSerializable
|
||||
{
|
||||
private $amount;
|
||||
private $currency;
|
||||
|
||||
public function __construct($amount, $currency)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
$this->currency = $currency;
|
||||
}
|
||||
|
||||
public static function inDefaultCurrency($amount)
|
||||
{
|
||||
return new self($amount, setting('default_currency'));
|
||||
}
|
||||
|
||||
public static function inCurrentCurrency($amount)
|
||||
{
|
||||
return new self($amount, currency());
|
||||
}
|
||||
|
||||
private function newInstance($amount)
|
||||
{
|
||||
return new self($amount, $this->currency);
|
||||
}
|
||||
|
||||
public function amount()
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
public function subunit()
|
||||
{
|
||||
$fraction = 10 ** Currency::subunit($this->currency);
|
||||
|
||||
return (int) round($this->amount * $fraction);
|
||||
}
|
||||
|
||||
public function currency()
|
||||
{
|
||||
return $this->currency;
|
||||
}
|
||||
|
||||
public function isZero()
|
||||
{
|
||||
return $this->amount == 0;
|
||||
}
|
||||
|
||||
public function add($addend)
|
||||
{
|
||||
$addend = $this->convertToSameCurrency($addend);
|
||||
|
||||
return $this->newInstance($this->amount + $addend->amount);
|
||||
}
|
||||
|
||||
public function subtract($subtrahend)
|
||||
{
|
||||
$subtrahend = $this->convertToSameCurrency($subtrahend);
|
||||
|
||||
return $this->newInstance($this->amount - $subtrahend->amount);
|
||||
}
|
||||
|
||||
public function multiply($multiplier)
|
||||
{
|
||||
return $this->newInstance($this->amount * $multiplier);
|
||||
}
|
||||
|
||||
public function divide($divisor)
|
||||
{
|
||||
return $this->newInstance($this->amount / $divisor);
|
||||
}
|
||||
|
||||
public function lessThan($other)
|
||||
{
|
||||
return $this->amount < $other->amount;
|
||||
}
|
||||
|
||||
public function lessThanOrEqual($other)
|
||||
{
|
||||
return $this->amount <= $other->amount;
|
||||
}
|
||||
|
||||
public function greaterThan($other)
|
||||
{
|
||||
return $this->amount > $other->amount;
|
||||
}
|
||||
|
||||
public function greaterThanOrEqual($other)
|
||||
{
|
||||
return $this->amount >= $other->amount;
|
||||
}
|
||||
|
||||
private function convertToSameCurrency($other)
|
||||
{
|
||||
if ($this->isNotSameCurrency($other)) {
|
||||
$other = $other->convertToDefaultCurrency();
|
||||
}
|
||||
|
||||
$this->assertSameCurrency($other);
|
||||
|
||||
return $other;
|
||||
}
|
||||
|
||||
public function isSameCurrency($other)
|
||||
{
|
||||
return $this->currency === $other->currency;
|
||||
}
|
||||
|
||||
public function isNotSameCurrency($other)
|
||||
{
|
||||
return ! $this->isSameCurrency($other);
|
||||
}
|
||||
|
||||
private function assertSameCurrency($other)
|
||||
{
|
||||
if ($this->isNotSameCurrency($other)) {
|
||||
throw new InvalidArgumentException('Mismatch money currency.');
|
||||
}
|
||||
}
|
||||
|
||||
public function convertToDefaultCurrency()
|
||||
{
|
||||
$currencyRate = CurrencyRate::for($this->currency);
|
||||
|
||||
if (is_null($currencyRate)) {
|
||||
throw new InvalidArgumentException('Cannot convert the money to the default currency.');
|
||||
}
|
||||
|
||||
return new self($this->amount / $currencyRate, setting('default_currency'));
|
||||
}
|
||||
|
||||
public function convertToCurrentCurrency($currencyRate = null)
|
||||
{
|
||||
return $this->convert(currency(), $currencyRate);
|
||||
}
|
||||
|
||||
public function convert($currency, $currencyRate = null)
|
||||
{
|
||||
$currencyRate = $currencyRate ?: CurrencyRate::for($currency);
|
||||
|
||||
if (is_null($currencyRate)) {
|
||||
throw new InvalidArgumentException("Cannot convert the money to currency [$currency].");
|
||||
}
|
||||
|
||||
return new self($this->amount * $currencyRate, $currency);
|
||||
}
|
||||
|
||||
public function round($precision = null, $mode = null)
|
||||
{
|
||||
if (is_null($precision)) {
|
||||
$precision = Currency::subunit($this->currency);
|
||||
}
|
||||
|
||||
$amount = round($this->amount, $precision, $mode);
|
||||
|
||||
return $this->newInstance($amount);
|
||||
}
|
||||
|
||||
public function ceil()
|
||||
{
|
||||
return $this->newInstance(ceil($this->amount));
|
||||
}
|
||||
|
||||
public function floor()
|
||||
{
|
||||
return $this->newInstance(floor($this->amount));
|
||||
}
|
||||
|
||||
public function format($currency = null, $locale = null)
|
||||
{
|
||||
$currency = $currency ?: currency();
|
||||
$locale = $locale ?: locale();
|
||||
|
||||
$numberFormatter = new NumberFormatter($locale, NumberFormatter::CURRENCY);
|
||||
|
||||
$amount = $numberFormatter->formatCurrency($this->amount, $currency);
|
||||
|
||||
/**
|
||||
* Fix: Hungarian Forint outputs wrong currency format.
|
||||
*
|
||||
* @see https://github.com/MehediDracula/FleetCart/issues/18
|
||||
*/
|
||||
if (currency() === 'HUF') {
|
||||
$amount = str_replace(',00', '', $amount);
|
||||
}
|
||||
|
||||
return $amount;
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return [
|
||||
'amount' => $this->amount,
|
||||
'formatted' => $this->format(),
|
||||
'currency' => $this->currency,
|
||||
];
|
||||
}
|
||||
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array_merge($this->toArray(), [
|
||||
'inCurrentCurrency' => $this->convertToCurrentCurrency()->toArray(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return (string) $this->amount;
|
||||
}
|
||||
}
|
||||
23
Modules/Support/Providers/EloquentMacroServiceProvider.php
Normal file
23
Modules/Support/Providers/EloquentMacroServiceProvider.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Providers;
|
||||
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class EloquentMacroServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Builder::macro('resetOrders', function () {
|
||||
$this->{$this->unions ? 'unionOrders' : 'orders'} = null;
|
||||
|
||||
return $this;
|
||||
});
|
||||
}
|
||||
}
|
||||
22
Modules/Support/Providers/MySQLScoutServiceProvider.php
Normal file
22
Modules/Support/Providers/MySQLScoutServiceProvider.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Providers;
|
||||
|
||||
use Laravel\Scout\EngineManager;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Modules\Support\Search\MySqlSearchEngine;
|
||||
|
||||
class MySQLScoutServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->app[EngineManager::class]->extend('mysql', function () {
|
||||
return new MySqlSearchEngine;
|
||||
});
|
||||
}
|
||||
}
|
||||
69
Modules/Support/RTLDetector.php
Normal file
69
Modules/Support/RTLDetector.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support;
|
||||
|
||||
class RTLDetector
|
||||
{
|
||||
private static $rtlLocales = [
|
||||
'ar',
|
||||
'ar_DZ',
|
||||
'ar_BH',
|
||||
'ar_TD',
|
||||
'ar_KM',
|
||||
'ar_DJ',
|
||||
'ar_EG',
|
||||
'ar_ER',
|
||||
'ar_IQ',
|
||||
'ar_IL',
|
||||
'ar_JO',
|
||||
'ar_KW',
|
||||
'ar_LB',
|
||||
'ar_LY',
|
||||
'ar_MR',
|
||||
'ar_MA',
|
||||
'ar_OM',
|
||||
'ar_PS',
|
||||
'ar_QA',
|
||||
'ar_SA',
|
||||
'ar_SO',
|
||||
'ar_SS',
|
||||
'ar_SD',
|
||||
'ar_SY',
|
||||
'ar_TN',
|
||||
'ar_AE',
|
||||
'ar_EH',
|
||||
'ar_YE',
|
||||
'arc',
|
||||
'dv',
|
||||
'fa',
|
||||
'fa_AF',
|
||||
'fa_IR',
|
||||
'ha',
|
||||
'ha_GH',
|
||||
'ha_Latn_GH',
|
||||
'ha_Latn_NE',
|
||||
'ha_Latn_NG',
|
||||
'ha_Latn',
|
||||
'ha_NE',
|
||||
'ha_NG',
|
||||
'he',
|
||||
'he_IL',
|
||||
'khw',
|
||||
'ks',
|
||||
'ks_Arab_IN',
|
||||
'ks_Arab',
|
||||
'ks_IN',
|
||||
'ku',
|
||||
'ps',
|
||||
'ps_AF',
|
||||
'ur',
|
||||
'ur_IN',
|
||||
'ur_PK',
|
||||
'yi',
|
||||
];
|
||||
|
||||
public static function detect($locale)
|
||||
{
|
||||
return in_array($locale, self::$rtlLocales);
|
||||
}
|
||||
}
|
||||
259
Modules/Support/Resources/countries.php
Normal file
259
Modules/Support/Resources/countries.php
Normal file
@@ -0,0 +1,259 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AF' => 'Afghanistan',
|
||||
'AX' => 'Åland Islands',
|
||||
'AL' => 'Albania',
|
||||
'DZ' => 'Algeria',
|
||||
'AS' => 'American Samoa',
|
||||
'AD' => 'Andorra',
|
||||
'AO' => 'Angola',
|
||||
'AI' => 'Anguilla',
|
||||
'AQ' => 'Antarctica',
|
||||
'AG' => 'Antigua & Barbuda',
|
||||
'AR' => 'Argentina',
|
||||
'AM' => 'Armenia',
|
||||
'AW' => 'Aruba',
|
||||
'AC' => 'Ascension Island',
|
||||
'AU' => 'Australia',
|
||||
'AT' => 'Austria',
|
||||
'AZ' => 'Azerbaijan',
|
||||
'BS' => 'Bahamas',
|
||||
'BH' => 'Bahrain',
|
||||
'BD' => 'Bangladesh',
|
||||
'BB' => 'Barbados',
|
||||
'BY' => 'Belarus',
|
||||
'BE' => 'Belgium',
|
||||
'BZ' => 'Belize',
|
||||
'BJ' => 'Benin',
|
||||
'BM' => 'Bermuda',
|
||||
'BT' => 'Bhutan',
|
||||
'BO' => 'Bolivia',
|
||||
'BA' => 'Bosnia & Herzegovina',
|
||||
'BW' => 'Botswana',
|
||||
'BR' => 'Brazil',
|
||||
'IO' => 'British Indian Ocean Territory',
|
||||
'VG' => 'British Virgin Islands',
|
||||
'BN' => 'Brunei',
|
||||
'BG' => 'Bulgaria',
|
||||
'BF' => 'Burkina Faso',
|
||||
'BI' => 'Burundi',
|
||||
'KH' => 'Cambodia',
|
||||
'CM' => 'Cameroon',
|
||||
'CA' => 'Canada',
|
||||
'IC' => 'Canary Islands',
|
||||
'CV' => 'Cape Verde',
|
||||
'BQ' => 'Caribbean Netherlands',
|
||||
'KY' => 'Cayman Islands',
|
||||
'CF' => 'Central African Republic',
|
||||
'EA' => 'Ceuta & Melilla',
|
||||
'TD' => 'Chad',
|
||||
'CL' => 'Chile',
|
||||
'CN' => 'China',
|
||||
'CX' => 'Christmas Island',
|
||||
'CC' => 'Cocos (Keeling) Islands',
|
||||
'CO' => 'Colombia',
|
||||
'KM' => 'Comoros',
|
||||
'CG' => 'Congo - Brazzaville',
|
||||
'CD' => 'Congo - Kinshasa',
|
||||
'CK' => 'Cook Islands',
|
||||
'CR' => 'Costa Rica',
|
||||
'CI' => 'Côte d’Ivoire',
|
||||
'HR' => 'Croatia',
|
||||
'CU' => 'Cuba',
|
||||
'CW' => 'Curaçao',
|
||||
'CY' => 'Cyprus',
|
||||
'CZ' => 'Czechia',
|
||||
'DK' => 'Denmark',
|
||||
'DG' => 'Diego Garcia',
|
||||
'DJ' => 'Djibouti',
|
||||
'DM' => 'Dominica',
|
||||
'DO' => 'Dominican Republic',
|
||||
'EC' => 'Ecuador',
|
||||
'EG' => 'Egypt',
|
||||
'SV' => 'El Salvador',
|
||||
'GQ' => 'Equatorial Guinea',
|
||||
'ER' => 'Eritrea',
|
||||
'EE' => 'Estonia',
|
||||
'ET' => 'Ethiopia',
|
||||
'EZ' => 'Eurozone',
|
||||
'FK' => 'Falkland Islands',
|
||||
'FO' => 'Faroe Islands',
|
||||
'FJ' => 'Fiji',
|
||||
'FI' => 'Finland',
|
||||
'FR' => 'France',
|
||||
'GF' => 'French Guiana',
|
||||
'PF' => 'French Polynesia',
|
||||
'TF' => 'French Southern Territories',
|
||||
'GA' => 'Gabon',
|
||||
'GM' => 'Gambia',
|
||||
'GE' => 'Georgia',
|
||||
'DE' => 'Germany',
|
||||
'GH' => 'Ghana',
|
||||
'GI' => 'Gibraltar',
|
||||
'GR' => 'Greece',
|
||||
'GL' => 'Greenland',
|
||||
'GD' => 'Grenada',
|
||||
'GP' => 'Guadeloupe',
|
||||
'GU' => 'Guam',
|
||||
'GT' => 'Guatemala',
|
||||
'GG' => 'Guernsey',
|
||||
'GN' => 'Guinea',
|
||||
'GW' => 'Guinea-Bissau',
|
||||
'GY' => 'Guyana',
|
||||
'HT' => 'Haiti',
|
||||
'HN' => 'Honduras',
|
||||
'HK' => 'Hong Kong SAR China',
|
||||
'HU' => 'Hungary',
|
||||
'IS' => 'Iceland',
|
||||
'IN' => 'India',
|
||||
'ID' => 'Indonesia',
|
||||
'IR' => 'Iran',
|
||||
'IQ' => 'Iraq',
|
||||
'IE' => 'Ireland',
|
||||
'IM' => 'Isle of Man',
|
||||
'IL' => 'Israel',
|
||||
'IT' => 'Italy',
|
||||
'JM' => 'Jamaica',
|
||||
'JP' => 'Japan',
|
||||
'JE' => 'Jersey',
|
||||
'JO' => 'Jordan',
|
||||
'KZ' => 'Kazakhstan',
|
||||
'KE' => 'Kenya',
|
||||
'KI' => 'Kiribati',
|
||||
'XK' => 'Kosovo',
|
||||
'KW' => 'Kuwait',
|
||||
'KG' => 'Kyrgyzstan',
|
||||
'LA' => 'Laos',
|
||||
'LV' => 'Latvia',
|
||||
'LB' => 'Lebanon',
|
||||
'LS' => 'Lesotho',
|
||||
'LR' => 'Liberia',
|
||||
'LY' => 'Libya',
|
||||
'LI' => 'Liechtenstein',
|
||||
'LT' => 'Lithuania',
|
||||
'LU' => 'Luxembourg',
|
||||
'MO' => 'Macau SAR China',
|
||||
'MK' => 'Macedonia',
|
||||
'MG' => 'Madagascar',
|
||||
'MW' => 'Malawi',
|
||||
'MY' => 'Malaysia',
|
||||
'MV' => 'Maldives',
|
||||
'ML' => 'Mali',
|
||||
'MT' => 'Malta',
|
||||
'MH' => 'Marshall Islands',
|
||||
'MQ' => 'Martinique',
|
||||
'MR' => 'Mauritania',
|
||||
'MU' => 'Mauritius',
|
||||
'YT' => 'Mayotte',
|
||||
'MX' => 'Mexico',
|
||||
'FM' => 'Micronesia',
|
||||
'MD' => 'Moldova',
|
||||
'MC' => 'Monaco',
|
||||
'MN' => 'Mongolia',
|
||||
'ME' => 'Montenegro',
|
||||
'MS' => 'Montserrat',
|
||||
'MA' => 'Morocco',
|
||||
'MZ' => 'Mozambique',
|
||||
'MM' => 'Myanmar (Burma)',
|
||||
'NA' => 'Namibia',
|
||||
'NR' => 'Nauru',
|
||||
'NP' => 'Nepal',
|
||||
'NL' => 'Netherlands',
|
||||
'NC' => 'New Caledonia',
|
||||
'NZ' => 'New Zealand',
|
||||
'NI' => 'Nicaragua',
|
||||
'NE' => 'Niger',
|
||||
'NG' => 'Nigeria',
|
||||
'NU' => 'Niue',
|
||||
'NF' => 'Norfolk Island',
|
||||
'KP' => 'North Korea',
|
||||
'MP' => 'Northern Mariana Islands',
|
||||
'NO' => 'Norway',
|
||||
'OM' => 'Oman',
|
||||
'PK' => 'Pakistan',
|
||||
'PW' => 'Palau',
|
||||
'PS' => 'Palestinian Territories',
|
||||
'PA' => 'Panama',
|
||||
'PG' => 'Papua New Guinea',
|
||||
'PY' => 'Paraguay',
|
||||
'PE' => 'Peru',
|
||||
'PH' => 'Philippines',
|
||||
'PN' => 'Pitcairn Islands',
|
||||
'PL' => 'Poland',
|
||||
'PT' => 'Portugal',
|
||||
'PR' => 'Puerto Rico',
|
||||
'QA' => 'Qatar',
|
||||
'RE' => 'Réunion',
|
||||
'RO' => 'Romania',
|
||||
'RU' => 'Russia',
|
||||
'RW' => 'Rwanda',
|
||||
'WS' => 'Samoa',
|
||||
'SM' => 'San Marino',
|
||||
'ST' => 'São Tomé & Príncipe',
|
||||
'SA' => 'Saudi Arabia',
|
||||
'SN' => 'Senegal',
|
||||
'RS' => 'Serbia',
|
||||
'SC' => 'Seychelles',
|
||||
'SL' => 'Sierra Leone',
|
||||
'SG' => 'Singapore',
|
||||
'SX' => 'Sint Maarten',
|
||||
'SK' => 'Slovakia',
|
||||
'SI' => 'Slovenia',
|
||||
'SB' => 'Solomon Islands',
|
||||
'SO' => 'Somalia',
|
||||
'ZA' => 'South Africa',
|
||||
'GS' => 'South Georgia & South Sandwich Islands',
|
||||
'KR' => 'South Korea',
|
||||
'SS' => 'South Sudan',
|
||||
'ES' => 'Spain',
|
||||
'LK' => 'Sri Lanka',
|
||||
'BL' => 'St. Barthélemy',
|
||||
'SH' => 'St. Helena',
|
||||
'KN' => 'St. Kitts & Nevis',
|
||||
'LC' => 'St. Lucia',
|
||||
'MF' => 'St. Martin',
|
||||
'PM' => 'St. Pierre & Miquelon',
|
||||
'VC' => 'St. Vincent & Grenadines',
|
||||
'SD' => 'Sudan',
|
||||
'SR' => 'Suriname',
|
||||
'SJ' => 'Svalbard & Jan Mayen',
|
||||
'SZ' => 'Swaziland',
|
||||
'SE' => 'Sweden',
|
||||
'CH' => 'Switzerland',
|
||||
'SY' => 'Syria',
|
||||
'TW' => 'Taiwan',
|
||||
'TJ' => 'Tajikistan',
|
||||
'TZ' => 'Tanzania',
|
||||
'TH' => 'Thailand',
|
||||
'TL' => 'Timor-Leste',
|
||||
'TG' => 'Togo',
|
||||
'TK' => 'Tokelau',
|
||||
'TO' => 'Tonga',
|
||||
'TT' => 'Trinidad & Tobago',
|
||||
'TA' => 'Tristan da Cunha',
|
||||
'TN' => 'Tunisia',
|
||||
'TR' => 'Turkey',
|
||||
'TM' => 'Turkmenistan',
|
||||
'TC' => 'Turks & Caicos Islands',
|
||||
'TV' => 'Tuvalu',
|
||||
'UM' => 'U.S. Outlying Islands',
|
||||
'VI' => 'U.S. Virgin Islands',
|
||||
'UG' => 'Uganda',
|
||||
'UA' => 'Ukraine',
|
||||
'AE' => 'United Arab Emirates',
|
||||
'GB' => 'United Kingdom',
|
||||
'UN' => 'United Nations',
|
||||
'US' => 'United States',
|
||||
'UY' => 'Uruguay',
|
||||
'UZ' => 'Uzbekistan',
|
||||
'VU' => 'Vanuatu',
|
||||
'VA' => 'Vatican City',
|
||||
'VE' => 'Venezuela',
|
||||
'VN' => 'Vietnam',
|
||||
'WF' => 'Wallis & Futuna',
|
||||
'EH' => 'Western Sahara',
|
||||
'YE' => 'Yemen',
|
||||
'ZM' => 'Zambia',
|
||||
'ZW' => 'Zimbabwe',
|
||||
];
|
||||
5
Modules/Support/Resources/lang/en/captcha.php
Normal file
5
Modules/Support/Resources/lang/en/captcha.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'update_code' => 'Update Code',
|
||||
];
|
||||
567
Modules/Support/Resources/locales.php
Normal file
567
Modules/Support/Resources/locales.php
Normal file
@@ -0,0 +1,567 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'af' => 'Afrikaans',
|
||||
'af_NA' => 'Afrikaans (Namibia)',
|
||||
'af_ZA' => 'Afrikaans (South Africa)',
|
||||
'ak' => 'Akan',
|
||||
'ak_GH' => 'Akan (Ghana)',
|
||||
'sq' => 'Albanian',
|
||||
'sq_AL' => 'Albanian (Albania)',
|
||||
'sq_XK' => 'Albanian (Kosovo)',
|
||||
'sq_MK' => 'Albanian (Macedonia)',
|
||||
'am' => 'Amharic',
|
||||
'am_ET' => 'Amharic (Ethiopia)',
|
||||
'ar' => 'Arabic',
|
||||
'ar_DZ' => 'Arabic (Algeria)',
|
||||
'ar_BH' => 'Arabic (Bahrain)',
|
||||
'ar_TD' => 'Arabic (Chad)',
|
||||
'ar_KM' => 'Arabic (Comoros)',
|
||||
'ar_DJ' => 'Arabic (Djibouti)',
|
||||
'ar_EG' => 'Arabic (Egypt)',
|
||||
'ar_ER' => 'Arabic (Eritrea)',
|
||||
'ar_IQ' => 'Arabic (Iraq)',
|
||||
'ar_IL' => 'Arabic (Israel)',
|
||||
'ar_JO' => 'Arabic (Jordan)',
|
||||
'ar_KW' => 'Arabic (Kuwait)',
|
||||
'ar_LB' => 'Arabic (Lebanon)',
|
||||
'ar_LY' => 'Arabic (Libya)',
|
||||
'ar_MR' => 'Arabic (Mauritania)',
|
||||
'ar_MA' => 'Arabic (Morocco)',
|
||||
'ar_OM' => 'Arabic (Oman)',
|
||||
'ar_PS' => 'Arabic (Palestinian Territories)',
|
||||
'ar_QA' => 'Arabic (Qatar)',
|
||||
'ar_SA' => 'Arabic (Saudi Arabia)',
|
||||
'ar_SO' => 'Arabic (Somalia)',
|
||||
'ar_SS' => 'Arabic (South Sudan)',
|
||||
'ar_SD' => 'Arabic (Sudan)',
|
||||
'ar_SY' => 'Arabic (Syria)',
|
||||
'ar_TN' => 'Arabic (Tunisia)',
|
||||
'ar_AE' => 'Arabic (United Arab Emirates)',
|
||||
'ar_EH' => 'Arabic (Western Sahara)',
|
||||
'ar_YE' => 'Arabic (Yemen)',
|
||||
'hy' => 'Armenian',
|
||||
'hy_AM' => 'Armenian (Armenia)',
|
||||
'as' => 'Assamese',
|
||||
'as_IN' => 'Assamese (India)',
|
||||
'az' => 'Azerbaijani',
|
||||
'az_AZ' => 'Azerbaijani (Azerbaijan)',
|
||||
'az_Cyrl_AZ' => 'Azerbaijani (Cyrillic, Azerbaijan)',
|
||||
'az_Cyrl' => 'Azerbaijani (Cyrillic)',
|
||||
'az_Latn_AZ' => 'Azerbaijani (Latin, Azerbaijan)',
|
||||
'az_Latn' => 'Azerbaijani (Latin)',
|
||||
'bm' => 'Bambara',
|
||||
'bm_Latn_ML' => 'Bambara (Latin, Mali)',
|
||||
'bm_Latn' => 'Bambara (Latin)',
|
||||
'eu' => 'Basque',
|
||||
'eu_ES' => 'Basque (Spain)',
|
||||
'be' => 'Belarusian',
|
||||
'be_BY' => 'Belarusian (Belarus)',
|
||||
'bn' => 'Bengali',
|
||||
'bn_BD' => 'Bengali (Bangladesh)',
|
||||
'bn_IN' => 'Bengali (India)',
|
||||
'bs' => 'Bosnian',
|
||||
'bs_BA' => 'Bosnian (Bosnia & Herzegovina)',
|
||||
'bs_Cyrl_BA' => 'Bosnian (Cyrillic, Bosnia & Herzegovina)',
|
||||
'bs_Cyrl' => 'Bosnian (Cyrillic)',
|
||||
'bs_Latn_BA' => 'Bosnian (Latin, Bosnia & Herzegovina)',
|
||||
'bs_Latn' => 'Bosnian (Latin)',
|
||||
'br' => 'Breton',
|
||||
'br_FR' => 'Breton (France)',
|
||||
'bg' => 'Bulgarian',
|
||||
'bg_BG' => 'Bulgarian (Bulgaria)',
|
||||
'my' => 'Burmese',
|
||||
'my_MM' => 'Burmese (Myanmar (Burma))',
|
||||
'ca' => 'Catalan',
|
||||
'ca_AD' => 'Catalan (Andorra)',
|
||||
'ca_FR' => 'Catalan (France)',
|
||||
'ca_IT' => 'Catalan (Italy)',
|
||||
'ca_ES' => 'Catalan (Spain)',
|
||||
'zh' => 'Chinese',
|
||||
'zh_CN' => 'Chinese (China)',
|
||||
'zh_HK' => 'Chinese (Hong Kong SAR China)',
|
||||
'zh_MO' => 'Chinese (Macau SAR China)',
|
||||
'zh_Hans_CN' => 'Chinese (Simplified, China)',
|
||||
'zh_Hans_HK' => 'Chinese (Simplified, Hong Kong SAR China)',
|
||||
'zh_Hans_MO' => 'Chinese (Simplified, Macau SAR China)',
|
||||
'zh_Hans_SG' => 'Chinese (Simplified, Singapore)',
|
||||
'zh_Hans' => 'Chinese (Simplified)',
|
||||
'zh_SG' => 'Chinese (Singapore)',
|
||||
'zh_TW' => 'Chinese (Taiwan)',
|
||||
'zh_Hant_HK' => 'Chinese (Traditional, Hong Kong SAR China)',
|
||||
'zh_Hant_MO' => 'Chinese (Traditional, Macau SAR China)',
|
||||
'zh_Hant_TW' => 'Chinese (Traditional, Taiwan)',
|
||||
'zh_Hant' => 'Chinese (Traditional)',
|
||||
'kw' => 'Cornish',
|
||||
'kw_GB' => 'Cornish (United Kingdom)',
|
||||
'hr' => 'Croatian',
|
||||
'hr_BA' => 'Croatian (Bosnia & Herzegovina)',
|
||||
'hr_HR' => 'Croatian (Croatia)',
|
||||
'cs' => 'Czech',
|
||||
'cs_CZ' => 'Czech (Czech Republic)',
|
||||
'da' => 'Danish',
|
||||
'da_DK' => 'Danish (Denmark)',
|
||||
'da_GL' => 'Danish (Greenland)',
|
||||
'nl' => 'Dutch',
|
||||
'nl_AW' => 'Dutch (Aruba)',
|
||||
'nl_BE' => 'Dutch (Belgium)',
|
||||
'nl_BQ' => 'Dutch (Caribbean Netherlands)',
|
||||
'nl_CW' => 'Dutch (Curaçao)',
|
||||
'nl_NL' => 'Dutch (Netherlands)',
|
||||
'nl_SX' => 'Dutch (Sint Maarten)',
|
||||
'nl_SR' => 'Dutch (Suriname)',
|
||||
'dz' => 'Dzongkha',
|
||||
'dz_BT' => 'Dzongkha (Bhutan)',
|
||||
'en' => 'English',
|
||||
'en_AS' => 'English (American Samoa)',
|
||||
'en_AI' => 'English (Anguilla)',
|
||||
'en_AG' => 'English (Antigua & Barbuda)',
|
||||
'en_AU' => 'English (Australia)',
|
||||
'en_BS' => 'English (Bahamas)',
|
||||
'en_BB' => 'English (Barbados)',
|
||||
'en_BE' => 'English (Belgium)',
|
||||
'en_BZ' => 'English (Belize)',
|
||||
'en_BM' => 'English (Bermuda)',
|
||||
'en_BW' => 'English (Botswana)',
|
||||
'en_IO' => 'English (British Indian Ocean Territory)',
|
||||
'en_VG' => 'English (British Virgin Islands)',
|
||||
'en_CM' => 'English (Cameroon)',
|
||||
'en_CA' => 'English (Canada)',
|
||||
'en_KY' => 'English (Cayman Islands)',
|
||||
'en_CX' => 'English (Christmas Island)',
|
||||
'en_CC' => 'English (Cocos (Keeling) Islands)',
|
||||
'en_CK' => 'English (Cook Islands)',
|
||||
'en_DG' => 'English (Diego Garcia)',
|
||||
'en_DM' => 'English (Dominica)',
|
||||
'en_ER' => 'English (Eritrea)',
|
||||
'en_FK' => 'English (Falkland Islands)',
|
||||
'en_FJ' => 'English (Fiji)',
|
||||
'en_GM' => 'English (Gambia)',
|
||||
'en_GH' => 'English (Ghana)',
|
||||
'en_GI' => 'English (Gibraltar)',
|
||||
'en_GD' => 'English (Grenada)',
|
||||
'en_GU' => 'English (Guam)',
|
||||
'en_GG' => 'English (Guernsey)',
|
||||
'en_GY' => 'English (Guyana)',
|
||||
'en_HK' => 'English (Hong Kong SAR China)',
|
||||
'en_IN' => 'English (India)',
|
||||
'en_IE' => 'English (Ireland)',
|
||||
'en_IM' => 'English (Isle of Man)',
|
||||
'en_JM' => 'English (Jamaica)',
|
||||
'en_JE' => 'English (Jersey)',
|
||||
'en_KE' => 'English (Kenya)',
|
||||
'en_KI' => 'English (Kiribati)',
|
||||
'en_LS' => 'English (Lesotho)',
|
||||
'en_LR' => 'English (Liberia)',
|
||||
'en_MO' => 'English (Macau SAR China)',
|
||||
'en_MG' => 'English (Madagascar)',
|
||||
'en_MW' => 'English (Malawi)',
|
||||
'en_MY' => 'English (Malaysia)',
|
||||
'en_MT' => 'English (Malta)',
|
||||
'en_MH' => 'English (Marshall Islands)',
|
||||
'en_MU' => 'English (Mauritius)',
|
||||
'en_FM' => 'English (Micronesia)',
|
||||
'en_MS' => 'English (Montserrat)',
|
||||
'en_NA' => 'English (Namibia)',
|
||||
'en_NR' => 'English (Nauru)',
|
||||
'en_NZ' => 'English (New Zealand)',
|
||||
'en_NG' => 'English (Nigeria)',
|
||||
'en_NU' => 'English (Niue)',
|
||||
'en_NF' => 'English (Norfolk Island)',
|
||||
'en_MP' => 'English (Northern Mariana Islands)',
|
||||
'en_PK' => 'English (Pakistan)',
|
||||
'en_PW' => 'English (Palau)',
|
||||
'en_PG' => 'English (Papua New Guinea)',
|
||||
'en_PH' => 'English (Philippines)',
|
||||
'en_PN' => 'English (Pitcairn Islands)',
|
||||
'en_PR' => 'English (Puerto Rico)',
|
||||
'en_RW' => 'English (Rwanda)',
|
||||
'en_WS' => 'English (Samoa)',
|
||||
'en_SC' => 'English (Seychelles)',
|
||||
'en_SL' => 'English (Sierra Leone)',
|
||||
'en_SG' => 'English (Singapore)',
|
||||
'en_SX' => 'English (Sint Maarten)',
|
||||
'en_SB' => 'English (Solomon Islands)',
|
||||
'en_ZA' => 'English (South Africa)',
|
||||
'en_SS' => 'English (South Sudan)',
|
||||
'en_SH' => 'English (St. Helena)',
|
||||
'en_KN' => 'English (St. Kitts & Nevis)',
|
||||
'en_LC' => 'English (St. Lucia)',
|
||||
'en_VC' => 'English (St. Vincent & Grenadines)',
|
||||
'en_SD' => 'English (Sudan)',
|
||||
'en_SZ' => 'English (Swaziland)',
|
||||
'en_TZ' => 'English (Tanzania)',
|
||||
'en_TK' => 'English (Tokelau)',
|
||||
'en_TO' => 'English (Tonga)',
|
||||
'en_TT' => 'English (Trinidad & Tobago)',
|
||||
'en_TC' => 'English (Turks & Caicos Islands)',
|
||||
'en_TV' => 'English (Tuvalu)',
|
||||
'en_UM' => 'English (U.S. Outlying Islands)',
|
||||
'en_VI' => 'English (U.S. Virgin Islands)',
|
||||
'en_UG' => 'English (Uganda)',
|
||||
'en_GB' => 'English (United Kingdom)',
|
||||
'en_US' => 'English (United States)',
|
||||
'en_VU' => 'English (Vanuatu)',
|
||||
'en_ZM' => 'English (Zambia)',
|
||||
'en_ZW' => 'English (Zimbabwe)',
|
||||
'eo' => 'Esperanto',
|
||||
'et' => 'Estonian',
|
||||
'et_EE' => 'Estonian (Estonia)',
|
||||
'ee' => 'Ewe',
|
||||
'ee_GH' => 'Ewe (Ghana)',
|
||||
'ee_TG' => 'Ewe (Togo)',
|
||||
'fo' => 'Faroese',
|
||||
'fo_FO' => 'Faroese (Faroe Islands)',
|
||||
'fi' => 'Finnish',
|
||||
'fi_FI' => 'Finnish (Finland)',
|
||||
'fr' => 'French',
|
||||
'fr_DZ' => 'French (Algeria)',
|
||||
'fr_BE' => 'French (Belgium)',
|
||||
'fr_BJ' => 'French (Benin)',
|
||||
'fr_BF' => 'French (Burkina Faso)',
|
||||
'fr_BI' => 'French (Burundi)',
|
||||
'fr_CM' => 'French (Cameroon)',
|
||||
'fr_CA' => 'French (Canada)',
|
||||
'fr_CF' => 'French (Central African Republic)',
|
||||
'fr_TD' => 'French (Chad)',
|
||||
'fr_KM' => 'French (Comoros)',
|
||||
'fr_CG' => 'French (Congo - Brazzaville)',
|
||||
'fr_CD' => 'French (Congo - Kinshasa)',
|
||||
'fr_CI' => 'French (Côte d’Ivoire)',
|
||||
'fr_DJ' => 'French (Djibouti)',
|
||||
'fr_GQ' => 'French (Equatorial Guinea)',
|
||||
'fr_FR' => 'French (France)',
|
||||
'fr_GF' => 'French (French Guiana)',
|
||||
'fr_PF' => 'French (French Polynesia)',
|
||||
'fr_GA' => 'French (Gabon)',
|
||||
'fr_GP' => 'French (Guadeloupe)',
|
||||
'fr_GN' => 'French (Guinea)',
|
||||
'fr_HT' => 'French (Haiti)',
|
||||
'fr_LU' => 'French (Luxembourg)',
|
||||
'fr_MG' => 'French (Madagascar)',
|
||||
'fr_ML' => 'French (Mali)',
|
||||
'fr_MQ' => 'French (Martinique)',
|
||||
'fr_MR' => 'French (Mauritania)',
|
||||
'fr_MU' => 'French (Mauritius)',
|
||||
'fr_YT' => 'French (Mayotte)',
|
||||
'fr_MC' => 'French (Monaco)',
|
||||
'fr_MA' => 'French (Morocco)',
|
||||
'fr_NC' => 'French (New Caledonia)',
|
||||
'fr_NE' => 'French (Niger)',
|
||||
'fr_RE' => 'French (Réunion)',
|
||||
'fr_RW' => 'French (Rwanda)',
|
||||
'fr_SN' => 'French (Senegal)',
|
||||
'fr_SC' => 'French (Seychelles)',
|
||||
'fr_BL' => 'French (St. Barthélemy)',
|
||||
'fr_MF' => 'French (St. Martin)',
|
||||
'fr_PM' => 'French (St. Pierre & Miquelon)',
|
||||
'fr_CH' => 'French (Switzerland)',
|
||||
'fr_SY' => 'French (Syria)',
|
||||
'fr_TG' => 'French (Togo)',
|
||||
'fr_TN' => 'French (Tunisia)',
|
||||
'fr_VU' => 'French (Vanuatu)',
|
||||
'fr_WF' => 'French (Wallis & Futuna)',
|
||||
'ff' => 'Fulah',
|
||||
'ff_CM' => 'Fulah (Cameroon)',
|
||||
'ff_GN' => 'Fulah (Guinea)',
|
||||
'ff_MR' => 'Fulah (Mauritania)',
|
||||
'ff_SN' => 'Fulah (Senegal)',
|
||||
'gl' => 'Galician',
|
||||
'gl_ES' => 'Galician (Spain)',
|
||||
'lg' => 'Ganda',
|
||||
'lg_UG' => 'Ganda (Uganda)',
|
||||
'ka' => 'Georgian',
|
||||
'ka_GE' => 'Georgian (Georgia)',
|
||||
'de' => 'German',
|
||||
'de_AT' => 'German (Austria)',
|
||||
'de_BE' => 'German (Belgium)',
|
||||
'de_DE' => 'German (Germany)',
|
||||
'de_LI' => 'German (Liechtenstein)',
|
||||
'de_LU' => 'German (Luxembourg)',
|
||||
'de_CH' => 'German (Switzerland)',
|
||||
'el' => 'Greek',
|
||||
'el_CY' => 'Greek (Cyprus)',
|
||||
'el_GR' => 'Greek (Greece)',
|
||||
'gu' => 'Gujarati',
|
||||
'gu_IN' => 'Gujarati (India)',
|
||||
'ha' => 'Hausa',
|
||||
'ha_GH' => 'Hausa (Ghana)',
|
||||
'ha_Latn_GH' => 'Hausa (Latin, Ghana)',
|
||||
'ha_Latn_NE' => 'Hausa (Latin, Niger)',
|
||||
'ha_Latn_NG' => 'Hausa (Latin, Nigeria)',
|
||||
'ha_Latn' => 'Hausa (Latin)',
|
||||
'ha_NE' => 'Hausa (Niger)',
|
||||
'ha_NG' => 'Hausa (Nigeria)',
|
||||
'he' => 'Hebrew',
|
||||
'he_IL' => 'Hebrew (Israel)',
|
||||
'hi' => 'Hindi',
|
||||
'hi_IN' => 'Hindi (India)',
|
||||
'hu' => 'Hungarian',
|
||||
'hu_HU' => 'Hungarian (Hungary)',
|
||||
'is' => 'Icelandic',
|
||||
'is_IS' => 'Icelandic (Iceland)',
|
||||
'ig' => 'Igbo',
|
||||
'ig_NG' => 'Igbo (Nigeria)',
|
||||
'id' => 'Indonesian',
|
||||
'id_ID' => 'Indonesian (Indonesia)',
|
||||
'ga' => 'Irish',
|
||||
'ga_IE' => 'Irish (Ireland)',
|
||||
'it' => 'Italian',
|
||||
'it_IT' => 'Italian (Italy)',
|
||||
'it_SM' => 'Italian (San Marino)',
|
||||
'it_CH' => 'Italian (Switzerland)',
|
||||
'ja' => 'Japanese',
|
||||
'ja_JP' => 'Japanese (Japan)',
|
||||
'kl' => 'Kalaallisut',
|
||||
'kl_GL' => 'Kalaallisut (Greenland)',
|
||||
'kn' => 'Kannada',
|
||||
'kn_IN' => 'Kannada (India)',
|
||||
'ks' => 'Kashmiri',
|
||||
'ks_Arab_IN' => 'Kashmiri (Arabic, India)',
|
||||
'ks_Arab' => 'Kashmiri (Arabic)',
|
||||
'ks_IN' => 'Kashmiri (India)',
|
||||
'kk' => 'Kazakh',
|
||||
'kk_Cyrl_KZ' => 'Kazakh (Cyrillic, Kazakhstan)',
|
||||
'kk_Cyrl' => 'Kazakh (Cyrillic)',
|
||||
'kk_KZ' => 'Kazakh (Kazakhstan)',
|
||||
'km' => 'Khmer',
|
||||
'km_KH' => 'Khmer (Cambodia)',
|
||||
'ki' => 'Kikuyu',
|
||||
'ki_KE' => 'Kikuyu (Kenya)',
|
||||
'rw' => 'Kinyarwanda',
|
||||
'rw_RW' => 'Kinyarwanda (Rwanda)',
|
||||
'ko' => 'Korean',
|
||||
'ko_KP' => 'Korean (North Korea)',
|
||||
'ko_KR' => 'Korean (South Korea)',
|
||||
'ky' => 'Kyrgyz',
|
||||
'ky_Cyrl_KG' => 'Kyrgyz (Cyrillic, Kyrgyzstan)',
|
||||
'ky_Cyrl' => 'Kyrgyz (Cyrillic)',
|
||||
'ky_KG' => 'Kyrgyz (Kyrgyzstan)',
|
||||
'lo' => 'Lao',
|
||||
'lo_LA' => 'Lao (Laos)',
|
||||
'lv' => 'Latvian',
|
||||
'lv_LV' => 'Latvian (Latvia)',
|
||||
'ln' => 'Lingala',
|
||||
'ln_AO' => 'Lingala (Angola)',
|
||||
'ln_CF' => 'Lingala (Central African Republic)',
|
||||
'ln_CG' => 'Lingala (Congo - Brazzaville)',
|
||||
'ln_CD' => 'Lingala (Congo - Kinshasa)',
|
||||
'lt' => 'Lithuanian',
|
||||
'lt_LT' => 'Lithuanian (Lithuania)',
|
||||
'lu' => 'Luba-Katanga',
|
||||
'lu_CD' => 'Luba-Katanga (Congo - Kinshasa)',
|
||||
'lb' => 'Luxembourgish',
|
||||
'lb_LU' => 'Luxembourgish (Luxembourg)',
|
||||
'mk' => 'Macedonian',
|
||||
'mk_MK' => 'Macedonian (Macedonia)',
|
||||
'mg' => 'Malagasy',
|
||||
'mg_MG' => 'Malagasy (Madagascar)',
|
||||
'ms' => 'Malay',
|
||||
'ms_BN' => 'Malay (Brunei)',
|
||||
'ms_Latn_BN' => 'Malay (Latin, Brunei)',
|
||||
'ms_Latn_MY' => 'Malay (Latin, Malaysia)',
|
||||
'ms_Latn_SG' => 'Malay (Latin, Singapore)',
|
||||
'ms_Latn' => 'Malay (Latin)',
|
||||
'ms_MY' => 'Malay (Malaysia)',
|
||||
'ms_SG' => 'Malay (Singapore)',
|
||||
'ml' => 'Malayalam',
|
||||
'ml_IN' => 'Malayalam (India)',
|
||||
'mt' => 'Maltese',
|
||||
'mt_MT' => 'Maltese (Malta)',
|
||||
'gv' => 'Manx',
|
||||
'gv_IM' => 'Manx (Isle of Man)',
|
||||
'mr' => 'Marathi',
|
||||
'mr_IN' => 'Marathi (India)',
|
||||
'mn' => 'Mongolian',
|
||||
'mn_Cyrl_MN' => 'Mongolian (Cyrillic, Mongolia)',
|
||||
'mn_Cyrl' => 'Mongolian (Cyrillic)',
|
||||
'mn_MN' => 'Mongolian (Mongolia)',
|
||||
'ne' => 'Nepali',
|
||||
'ne_IN' => 'Nepali (India)',
|
||||
'ne_NP' => 'Nepali (Nepal)',
|
||||
'nd' => 'North Ndebele',
|
||||
'nd_ZW' => 'North Ndebele (Zimbabwe)',
|
||||
'se' => 'Northern Sami',
|
||||
'se_FI' => 'Northern Sami (Finland)',
|
||||
'se_NO' => 'Northern Sami (Norway)',
|
||||
'se_SE' => 'Northern Sami (Sweden)',
|
||||
'no' => 'Norwegian',
|
||||
'no_NO' => 'Norwegian (Norway)',
|
||||
'nb' => 'Norwegian Bokmål',
|
||||
'nb_NO' => 'Norwegian Bokmål (Norway)',
|
||||
'nb_SJ' => 'Norwegian Bokmål (Svalbard & Jan Mayen)',
|
||||
'nn' => 'Norwegian Nynorsk',
|
||||
'nn_NO' => 'Norwegian Nynorsk (Norway)',
|
||||
'or' => 'Oriya',
|
||||
'or_IN' => 'Oriya (India)',
|
||||
'om' => 'Oromo',
|
||||
'om_ET' => 'Oromo (Ethiopia)',
|
||||
'om_KE' => 'Oromo (Kenya)',
|
||||
'os' => 'Ossetic',
|
||||
'os_GE' => 'Ossetic (Georgia)',
|
||||
'os_RU' => 'Ossetic (Russia)',
|
||||
'ps' => 'Pashto',
|
||||
'ps_AF' => 'Pashto (Afghanistan)',
|
||||
'fa' => 'Persian',
|
||||
'fa_AF' => 'Persian (Afghanistan)',
|
||||
'fa_IR' => 'Persian (Iran)',
|
||||
'pl' => 'Polish',
|
||||
'pl_PL' => 'Polish (Poland)',
|
||||
'pt' => 'Portuguese',
|
||||
'pt_AO' => 'Portuguese (Angola)',
|
||||
'pt_BR' => 'Portuguese (Brazil)',
|
||||
'pt_CV' => 'Portuguese (Cape Verde)',
|
||||
'pt_GW' => 'Portuguese (Guinea-Bissau)',
|
||||
'pt_MO' => 'Portuguese (Macau SAR China)',
|
||||
'pt_MZ' => 'Portuguese (Mozambique)',
|
||||
'pt_PT' => 'Portuguese (Portugal)',
|
||||
'pt_ST' => 'Portuguese (São Tomé & Príncipe)',
|
||||
'pt_TL' => 'Portuguese (Timor-Leste)',
|
||||
'pa' => 'Punjabi',
|
||||
'pa_Arab_PK' => 'Punjabi (Arabic, Pakistan)',
|
||||
'pa_Arab' => 'Punjabi (Arabic)',
|
||||
'pa_Guru_IN' => 'Punjabi (Gurmukhi, India)',
|
||||
'pa_Guru' => 'Punjabi (Gurmukhi)',
|
||||
'pa_IN' => 'Punjabi (India)',
|
||||
'pa_PK' => 'Punjabi (Pakistan)',
|
||||
'qu' => 'Quechua',
|
||||
'qu_BO' => 'Quechua (Bolivia)',
|
||||
'qu_EC' => 'Quechua (Ecuador)',
|
||||
'qu_PE' => 'Quechua (Peru)',
|
||||
'ro' => 'Romanian',
|
||||
'ro_MD' => 'Romanian (Moldova)',
|
||||
'ro_RO' => 'Romanian (Romania)',
|
||||
'rm' => 'Romansh',
|
||||
'rm_CH' => 'Romansh (Switzerland)',
|
||||
'rn' => 'Rundi',
|
||||
'rn_BI' => 'Rundi (Burundi)',
|
||||
'ru' => 'Russian',
|
||||
'ru_BY' => 'Russian (Belarus)',
|
||||
'ru_KZ' => 'Russian (Kazakhstan)',
|
||||
'ru_KG' => 'Russian (Kyrgyzstan)',
|
||||
'ru_MD' => 'Russian (Moldova)',
|
||||
'ru_RU' => 'Russian (Russia)',
|
||||
'ru_UA' => 'Russian (Ukraine)',
|
||||
'sg' => 'Sango',
|
||||
'sg_CF' => 'Sango (Central African Republic)',
|
||||
'gd' => 'Scottish Gaelic',
|
||||
'gd_GB' => 'Scottish Gaelic (United Kingdom)',
|
||||
'sr' => 'Serbian',
|
||||
'sr_BA' => 'Serbian (Bosnia & Herzegovina)',
|
||||
'sr_Cyrl_BA' => 'Serbian (Cyrillic, Bosnia & Herzegovina)',
|
||||
'sr_Cyrl_XK' => 'Serbian (Cyrillic, Kosovo)',
|
||||
'sr_Cyrl_ME' => 'Serbian (Cyrillic, Montenegro)',
|
||||
'sr_Cyrl_RS' => 'Serbian (Cyrillic, Serbia)',
|
||||
'sr_Cyrl' => 'Serbian (Cyrillic)',
|
||||
'sr_XK' => 'Serbian (Kosovo)',
|
||||
'sr_Latn_BA' => 'Serbian (Latin, Bosnia & Herzegovina)',
|
||||
'sr_Latn_XK' => 'Serbian (Latin, Kosovo)',
|
||||
'sr_Latn_ME' => 'Serbian (Latin, Montenegro)',
|
||||
'sr_Latn_RS' => 'Serbian (Latin, Serbia)',
|
||||
'sr_Latn' => 'Serbian (Latin)',
|
||||
'sr_ME' => 'Serbian (Montenegro)',
|
||||
'sr_RS' => 'Serbian (Serbia)',
|
||||
'sh' => 'Serbo-Croatian',
|
||||
'sh_BA' => 'Serbo-Croatian (Bosnia & Herzegovina)',
|
||||
'sn' => 'Shona',
|
||||
'sn_ZW' => 'Shona (Zimbabwe)',
|
||||
'ii' => 'Sichuan Yi',
|
||||
'ii_CN' => 'Sichuan Yi (China)',
|
||||
'si' => 'Sinhala',
|
||||
'si_LK' => 'Sinhala (Sri Lanka)',
|
||||
'sk' => 'Slovak',
|
||||
'sk_SK' => 'Slovak (Slovakia)',
|
||||
'sl' => 'Slovenian',
|
||||
'sl_SI' => 'Slovenian (Slovenia)',
|
||||
'so' => 'Somali',
|
||||
'so_DJ' => 'Somali (Djibouti)',
|
||||
'so_ET' => 'Somali (Ethiopia)',
|
||||
'so_KE' => 'Somali (Kenya)',
|
||||
'so_SO' => 'Somali (Somalia)',
|
||||
'es' => 'Spanish',
|
||||
'es_AR' => 'Spanish (Argentina)',
|
||||
'es_BO' => 'Spanish (Bolivia)',
|
||||
'es_IC' => 'Spanish (Canary Islands)',
|
||||
'es_EA' => 'Spanish (Ceuta & Melilla)',
|
||||
'es_CL' => 'Spanish (Chile)',
|
||||
'es_CO' => 'Spanish (Colombia)',
|
||||
'es_CR' => 'Spanish (Costa Rica)',
|
||||
'es_CU' => 'Spanish (Cuba)',
|
||||
'es_DO' => 'Spanish (Dominican Republic)',
|
||||
'es_EC' => 'Spanish (Ecuador)',
|
||||
'es_SV' => 'Spanish (El Salvador)',
|
||||
'es_GQ' => 'Spanish (Equatorial Guinea)',
|
||||
'es_GT' => 'Spanish (Guatemala)',
|
||||
'es_HN' => 'Spanish (Honduras)',
|
||||
'es_MX' => 'Spanish (Mexico)',
|
||||
'es_NI' => 'Spanish (Nicaragua)',
|
||||
'es_PA' => 'Spanish (Panama)',
|
||||
'es_PY' => 'Spanish (Paraguay)',
|
||||
'es_PE' => 'Spanish (Peru)',
|
||||
'es_PH' => 'Spanish (Philippines)',
|
||||
'es_PR' => 'Spanish (Puerto Rico)',
|
||||
'es_ES' => 'Spanish (Spain)',
|
||||
'es_US' => 'Spanish (United States)',
|
||||
'es_UY' => 'Spanish (Uruguay)',
|
||||
'es_VE' => 'Spanish (Venezuela)',
|
||||
'sw' => 'Swahili',
|
||||
'sw_KE' => 'Swahili (Kenya)',
|
||||
'sw_TZ' => 'Swahili (Tanzania)',
|
||||
'sw_UG' => 'Swahili (Uganda)',
|
||||
'sv' => 'Swedish',
|
||||
'sv_AX' => 'Swedish (Åland Islands)',
|
||||
'sv_FI' => 'Swedish (Finland)',
|
||||
'sv_SE' => 'Swedish (Sweden)',
|
||||
'tl' => 'Tagalog',
|
||||
'tl_PH' => 'Tagalog (Philippines)',
|
||||
'ta' => 'Tamil',
|
||||
'ta_IN' => 'Tamil (India)',
|
||||
'ta_MY' => 'Tamil (Malaysia)',
|
||||
'ta_SG' => 'Tamil (Singapore)',
|
||||
'ta_LK' => 'Tamil (Sri Lanka)',
|
||||
'te' => 'Telugu',
|
||||
'te_IN' => 'Telugu (India)',
|
||||
'th' => 'Thai',
|
||||
'th_TH' => 'Thai (Thailand)',
|
||||
'bo' => 'Tibetan',
|
||||
'bo_CN' => 'Tibetan (China)',
|
||||
'bo_IN' => 'Tibetan (India)',
|
||||
'ti' => 'Tigrinya',
|
||||
'ti_ER' => 'Tigrinya (Eritrea)',
|
||||
'ti_ET' => 'Tigrinya (Ethiopia)',
|
||||
'to' => 'Tongan',
|
||||
'to_TO' => 'Tongan (Tonga)',
|
||||
'tr' => 'Turkish',
|
||||
'tr_CY' => 'Turkish (Cyprus)',
|
||||
'tr_TR' => 'Turkish (Turkey)',
|
||||
'uk' => 'Ukrainian',
|
||||
'uk_UA' => 'Ukrainian (Ukraine)',
|
||||
'ur' => 'Urdu',
|
||||
'ur_IN' => 'Urdu (India)',
|
||||
'ur_PK' => 'Urdu (Pakistan)',
|
||||
'ug' => 'Uyghur',
|
||||
'ug_Arab_CN' => 'Uyghur (Arabic, China)',
|
||||
'ug_Arab' => 'Uyghur (Arabic)',
|
||||
'ug_CN' => 'Uyghur (China)',
|
||||
'uz' => 'Uzbek',
|
||||
'uz_AF' => 'Uzbek (Afghanistan)',
|
||||
'uz_Arab_AF' => 'Uzbek (Arabic, Afghanistan)',
|
||||
'uz_Arab' => 'Uzbek (Arabic)',
|
||||
'uz_Cyrl_UZ' => 'Uzbek (Cyrillic, Uzbekistan)',
|
||||
'uz_Cyrl' => 'Uzbek (Cyrillic)',
|
||||
'uz_Latn_UZ' => 'Uzbek (Latin, Uzbekistan)',
|
||||
'uz_Latn' => 'Uzbek (Latin)',
|
||||
'uz_UZ' => 'Uzbek (Uzbekistan)',
|
||||
'vi' => 'Vietnamese',
|
||||
'vi_VN' => 'Vietnamese (Vietnam)',
|
||||
'cy' => 'Welsh',
|
||||
'cy_GB' => 'Welsh (United Kingdom)',
|
||||
'fy' => 'Western Frisian',
|
||||
'fy_NL' => 'Western Frisian (Netherlands)',
|
||||
'yi' => 'Yiddish',
|
||||
'yo' => 'Yoruba',
|
||||
'yo_BJ' => 'Yoruba (Benin)',
|
||||
'yo_NG' => 'Yoruba (Nigeria)',
|
||||
'zu' => 'Zulu',
|
||||
'zu_ZA' => 'Zulu (South Africa)',
|
||||
];
|
||||
22
Modules/Support/Resources/states/AO.php
Normal file
22
Modules/Support/Resources/states/AO.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'BGO' => 'Bengo',
|
||||
'BLU' => 'Benguela',
|
||||
'BIE' => 'Bié',
|
||||
'CAB' => 'Cabinda',
|
||||
'CNN' => 'Cunene',
|
||||
'HUA' => 'Huambo',
|
||||
'HUI' => 'Huíla',
|
||||
'CCU' => 'Kuando Kubango',
|
||||
'CNO' => 'Kwanza-Norte',
|
||||
'CUS' => 'Kwanza-Sul',
|
||||
'LUA' => 'Luanda',
|
||||
'LNO' => 'Lunda-Norte',
|
||||
'LSU' => 'Lunda-Sul',
|
||||
'MAL' => 'Malanje',
|
||||
'MOX' => 'Moxico',
|
||||
'NAM' => 'Namibe',
|
||||
'UIG' => 'Uíge',
|
||||
'ZAI' => 'Zaire',
|
||||
];
|
||||
28
Modules/Support/Resources/states/AR.php
Normal file
28
Modules/Support/Resources/states/AR.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'C' => 'Ciudad Autónoma de Buenos Aires',
|
||||
'B' => 'Buenos Aires',
|
||||
'K' => 'Catamarca',
|
||||
'H' => 'Chaco',
|
||||
'U' => 'Chubut',
|
||||
'X' => 'Córdoba',
|
||||
'W' => 'Corrientes',
|
||||
'E' => 'Entre Ríos',
|
||||
'P' => 'Formosa',
|
||||
'Y' => 'Jujuy',
|
||||
'L' => 'La Pampa',
|
||||
'F' => 'La Rioja',
|
||||
'M' => 'Mendoza',
|
||||
'N' => 'Misiones',
|
||||
'Q' => 'Neuquén',
|
||||
'R' => 'Río Negro',
|
||||
'A' => 'Salta',
|
||||
'J' => 'San Juan',
|
||||
'D' => 'San Luis',
|
||||
'Z' => 'Santa Cruz',
|
||||
'S' => 'Santa Fe',
|
||||
'G' => 'Santiago del Estero',
|
||||
'V' => 'Tierra del Fuego',
|
||||
'T' => 'Tucumán',
|
||||
];
|
||||
12
Modules/Support/Resources/states/AU.php
Normal file
12
Modules/Support/Resources/states/AU.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ACT' => 'Australian Capital Territory',
|
||||
'NSW' => 'New South Wales',
|
||||
'NT' => 'Northern Territory',
|
||||
'QLD' => 'Queensland',
|
||||
'SA' => 'South Australia',
|
||||
'TAS' => 'Tasmania',
|
||||
'VIC' => 'Victoria',
|
||||
'WA' => 'Western Australia',
|
||||
];
|
||||
68
Modules/Support/Resources/states/BD.php
Normal file
68
Modules/Support/Resources/states/BD.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'BAG' => 'Bagerhat',
|
||||
'BAN' => 'Bandarban',
|
||||
'BAR' => 'Barguna',
|
||||
'BARI' => 'Barisal',
|
||||
'BHO' => 'Bhola',
|
||||
'BOG' => 'Bogra',
|
||||
'BRA' => 'Brahmanbaria',
|
||||
'CHA' => 'Chandpur',
|
||||
'CHI' => 'Chittagong',
|
||||
'CHU' => 'Chuadanga',
|
||||
'COM' => 'Comilla',
|
||||
'COX' => 'Cox\'s Bazar',
|
||||
'DHA' => 'Dhaka',
|
||||
'DIN' => 'Dinajpur',
|
||||
'FAR' => 'Faridpur ',
|
||||
'FEN' => 'Feni',
|
||||
'GAI' => 'Gaibandha',
|
||||
'GAZI' => 'Gazipur',
|
||||
'GOP' => 'Gopalganj',
|
||||
'HAB' => 'Habiganj',
|
||||
'JAM' => 'Jamalpur',
|
||||
'JES' => 'Jessore',
|
||||
'JHA' => 'Jhalokati',
|
||||
'JHE' => 'Jhenaidah',
|
||||
'JOY' => 'Joypurhat',
|
||||
'KHA' => 'Khagrachhari',
|
||||
'KHU' => 'Khulna',
|
||||
'KIS' => 'Kishoreganj',
|
||||
'KUR' => 'Kurigram',
|
||||
'KUS' => 'Kushtia',
|
||||
'LAK' => 'Lakshmipur',
|
||||
'LAL' => 'Lalmonirhat',
|
||||
'MAD' => 'Madaripur',
|
||||
'MAG' => 'Magura',
|
||||
'MAN' => 'Manikganj ',
|
||||
'MEH' => 'Meherpur',
|
||||
'MOU' => 'Moulvibazar',
|
||||
'MUN' => 'Munshiganj',
|
||||
'MYM' => 'Mymensingh',
|
||||
'NAO' => 'Naogaon',
|
||||
'NAR' => 'Narail',
|
||||
'NARG' => 'Narayanganj',
|
||||
'NARD' => 'Narsingdi',
|
||||
'NAT' => 'Natore',
|
||||
'NAW' => 'Nawabganj',
|
||||
'NET' => 'Netrakona',
|
||||
'NIL' => 'Nilphamari',
|
||||
'NOA' => 'Noakhali',
|
||||
'PAB' => 'Pabna',
|
||||
'PAN' => 'Panchagarh',
|
||||
'PAT' => 'Patuakhali',
|
||||
'PIR' => 'Pirojpur',
|
||||
'RAJB' => 'Rajbari',
|
||||
'RAJ' => 'Rajshahi',
|
||||
'RAN' => 'Rangamati',
|
||||
'RANP' => 'Rangpur',
|
||||
'SAT' => 'Satkhira',
|
||||
'SHA' => 'Shariatpur',
|
||||
'SHE' => 'Sherpur',
|
||||
'SIR' => 'Sirajganj',
|
||||
'SUN' => 'Sunamganj',
|
||||
'SYL' => 'Sylhet',
|
||||
'TAN' => 'Tangail',
|
||||
'THA' => 'Thakurgaon',
|
||||
];
|
||||
32
Modules/Support/Resources/states/BG.php
Normal file
32
Modules/Support/Resources/states/BG.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'BG-01' => 'Blagoevgrad',
|
||||
'BG-02' => 'Burgas',
|
||||
'BG-08' => 'Dobrich',
|
||||
'BG-07' => 'Gabrovo',
|
||||
'BG-26' => 'Haskovo',
|
||||
'BG-09' => 'Kardzhali',
|
||||
'BG-10' => 'Kyustendil',
|
||||
'BG-11' => 'Lovech',
|
||||
'BG-12' => 'Montana',
|
||||
'BG-13' => 'Pazardzhik',
|
||||
'BG-14' => 'Pernik',
|
||||
'BG-15' => 'Pleven',
|
||||
'BG-16' => 'Plovdiv',
|
||||
'BG-17' => 'Razgrad',
|
||||
'BG-18' => 'Ruse',
|
||||
'BG-27' => 'Shumen',
|
||||
'BG-19' => 'Silistra',
|
||||
'BG-20' => 'Sliven',
|
||||
'BG-21' => 'Smolyan',
|
||||
'BG-23' => 'Sofia',
|
||||
'BG-22' => 'Sofia-Grad',
|
||||
'BG-24' => 'Stara Zagora',
|
||||
'BG-25' => 'Targovishte',
|
||||
'BG-03' => 'Varna',
|
||||
'BG-04' => 'Veliko Tarnovo',
|
||||
'BG-05' => 'Vidin',
|
||||
'BG-06' => 'Vratsa',
|
||||
'BG-28' => 'Yambol',
|
||||
];
|
||||
13
Modules/Support/Resources/states/BO.php
Normal file
13
Modules/Support/Resources/states/BO.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'B' => 'Chuquisaca',
|
||||
'H' => 'Beni',
|
||||
'C' => 'Cochabamba',
|
||||
'L' => 'La Paz',
|
||||
'O' => 'Oruro',
|
||||
'N' => 'Pando',
|
||||
'P' => 'Potosí',
|
||||
'S' => 'Santa Cruz',
|
||||
'T' => 'Tarija',
|
||||
];
|
||||
31
Modules/Support/Resources/states/BR.php
Normal file
31
Modules/Support/Resources/states/BR.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AC' => 'Acre',
|
||||
'AL' => 'Alagoas',
|
||||
'AP' => 'Amapá',
|
||||
'AM' => 'Amazonas',
|
||||
'BA' => 'Bahia',
|
||||
'CE' => 'Ceará',
|
||||
'DF' => 'Distrito Federal',
|
||||
'ES' => 'Espírito Santo',
|
||||
'GO' => 'Goiás',
|
||||
'MA' => 'Maranhão',
|
||||
'MT' => 'Mato Grosso',
|
||||
'MS' => 'Mato Grosso do Sul',
|
||||
'MG' => 'Minas Gerais',
|
||||
'PA' => 'Pará',
|
||||
'PB' => 'Paraíba',
|
||||
'PR' => 'Paraná',
|
||||
'PE' => 'Pernambuco',
|
||||
'PI' => 'Piauí',
|
||||
'RJ' => 'Rio de Janeiro',
|
||||
'RN' => 'Rio Grande do Norte',
|
||||
'RS' => 'Rio Grande do Sul',
|
||||
'RO' => 'Rondônia',
|
||||
'RR' => 'Roraima',
|
||||
'SC' => 'Santa Catarina',
|
||||
'SP' => 'São Paulo',
|
||||
'SE' => 'Sergipe',
|
||||
'TO' => 'Tocantins',
|
||||
];
|
||||
17
Modules/Support/Resources/states/CA.php
Normal file
17
Modules/Support/Resources/states/CA.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AB' => 'Alberta',
|
||||
'BC' => 'British Columbia',
|
||||
'MB' => 'Manitoba',
|
||||
'NB' => 'New Brunswick',
|
||||
'NL' => 'Newfoundland and Labrador',
|
||||
'NT' => 'Northwest Territories',
|
||||
'NS' => 'Nova Scotia',
|
||||
'NU' => 'Nunavut',
|
||||
'ON' => 'Ontario',
|
||||
'PE' => 'Prince Edward Island',
|
||||
'QC' => 'Quebec',
|
||||
'SK' => 'Saskatchewan',
|
||||
'YT' => 'Yukon Territory',
|
||||
];
|
||||
30
Modules/Support/Resources/states/CH.php
Normal file
30
Modules/Support/Resources/states/CH.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AG' => 'Aargau',
|
||||
'AR' => 'Appenzell Ausserrhoden',
|
||||
'AI' => 'Appenzell Innerrhoden',
|
||||
'BL' => 'Basel-Landschaft',
|
||||
'BS' => 'Basel-Stadt',
|
||||
'BE' => 'Bern',
|
||||
'FR' => 'Fribourg',
|
||||
'GE' => 'Geneva',
|
||||
'GL' => 'Glarus',
|
||||
'GR' => 'Graubünden',
|
||||
'JU' => 'Jura',
|
||||
'LU' => 'Luzern',
|
||||
'NE' => 'Neuchâtel',
|
||||
'NW' => 'Nidwalden',
|
||||
'OW' => 'Obwalden',
|
||||
'SH' => 'Schaffhausen',
|
||||
'SZ' => 'Schwyz',
|
||||
'SO' => 'Solothurn',
|
||||
'SG' => 'St. Gallen',
|
||||
'TG' => 'Thurgau',
|
||||
'TI' => 'Ticino',
|
||||
'UR' => 'Uri',
|
||||
'VS' => 'Valais',
|
||||
'VD' => 'Vaud',
|
||||
'ZG' => 'Zug',
|
||||
'ZH' => 'Zürich',
|
||||
];
|
||||
36
Modules/Support/Resources/states/CN.php
Normal file
36
Modules/Support/Resources/states/CN.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'CN1' => 'Yunnan',
|
||||
'CN2' => 'Beijing',
|
||||
'CN3' => 'Tianjin',
|
||||
'CN4' => 'Hebei',
|
||||
'CN5' => 'Shanxi',
|
||||
'CN6' => 'Inner Mongolia',
|
||||
'CN7' => 'Liaoning',
|
||||
'CN8' => 'Jilin',
|
||||
'CN9' => 'Heilongjiang',
|
||||
'CN10' => 'Shanghai',
|
||||
'CN11' => 'Jiangsu',
|
||||
'CN12' => 'Zhejiang',
|
||||
'CN13' => 'Anhui',
|
||||
'CN14' => 'Fujian',
|
||||
'CN15' => 'Jiangxi',
|
||||
'CN16' => 'Shandong',
|
||||
'CN17' => 'Henan',
|
||||
'CN18' => 'Hubei',
|
||||
'CN19' => 'Hunan',
|
||||
'CN20' => 'Guangdong',
|
||||
'CN21' => 'Guangxi Zhuang',
|
||||
'CN22' => 'Hainan',
|
||||
'CN23' => 'Chongqing',
|
||||
'CN24' => 'Sichuan',
|
||||
'CN25' => 'Guizhou',
|
||||
'CN26' => 'Shaanxi',
|
||||
'CN27' => 'Gansu',
|
||||
'CN28' => 'Qinghai',
|
||||
'CN29' => 'Ningxia Hui',
|
||||
'CN30' => 'Macau',
|
||||
'CN31' => 'Tibet',
|
||||
'CN32' => 'Xinjiang',
|
||||
];
|
||||
56
Modules/Support/Resources/states/ES.php
Normal file
56
Modules/Support/Resources/states/ES.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'C' => 'A Coruña',
|
||||
'VI' => 'Araba/Álava',
|
||||
'AB' => 'Albacete',
|
||||
'A' => 'Alicante',
|
||||
'AL' => 'Almería',
|
||||
'O' => 'Asturias',
|
||||
'AV' => 'Ávila',
|
||||
'BA' => 'Badajoz',
|
||||
'PM' => 'Baleares',
|
||||
'B' => 'Barcelona',
|
||||
'BU' => 'Burgos',
|
||||
'CC' => 'Cáceres',
|
||||
'CA' => 'Cádiz',
|
||||
'S' => 'Cantabria',
|
||||
'CS' => 'Castellón',
|
||||
'CE' => 'Ceuta',
|
||||
'CR' => 'Ciudad Real',
|
||||
'CO' => 'Córdoba',
|
||||
'CU' => 'Cuenca',
|
||||
'GI' => 'Girona',
|
||||
'GR' => 'Granada',
|
||||
'GU' => 'Guadalajara',
|
||||
'SS' => 'Gipuzkoa',
|
||||
'H' => 'Huelva',
|
||||
'HU' => 'Huesca',
|
||||
'J' => 'Jaén',
|
||||
'LO' => 'La Rioja',
|
||||
'GC' => 'Las Palmas',
|
||||
'LE' => 'León',
|
||||
'L' => 'Lleida',
|
||||
'LU' => 'Lugo',
|
||||
'M' => 'Madrid',
|
||||
'MA' => 'Málaga',
|
||||
'ML' => 'Melilla',
|
||||
'MU' => 'Murcia',
|
||||
'NA' => 'Navarra',
|
||||
'OR' => 'Ourense',
|
||||
'P' => 'Palencia',
|
||||
'PO' => 'Pontevedra',
|
||||
'SA' => 'Salamanca',
|
||||
'TF' => 'Santa Cruz de Tenerife',
|
||||
'SG' => 'Segovia',
|
||||
'SE' => 'Sevilla',
|
||||
'SO' => 'Soria',
|
||||
'T' => 'Tarragona',
|
||||
'TE' => 'Teruel',
|
||||
'TO' => 'Toledo',
|
||||
'V' => 'Valencia',
|
||||
'VA' => 'Valladolid',
|
||||
'BI' => 'Bizkaia',
|
||||
'ZA' => 'Zamora',
|
||||
'Z' => 'Zaragoza',
|
||||
];
|
||||
17
Modules/Support/Resources/states/GR.php
Normal file
17
Modules/Support/Resources/states/GR.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'I' => 'Αττική',
|
||||
'A' => 'Ανατολική Μακεδονία και Θράκη',
|
||||
'B' => 'Κεντρική Μακεδονία',
|
||||
'C' => 'Δυτική Μακεδονία',
|
||||
'D' => 'Ήπειρος',
|
||||
'E' => 'Θεσσαλία',
|
||||
'F' => 'Ιόνιοι Νήσοι',
|
||||
'G' => 'Δυτική Ελλάδα',
|
||||
'H' => 'Στερεά Ελλάδα',
|
||||
'J' => 'Πελοπόννησος',
|
||||
'K' => 'Βόρειο Αιγαίο',
|
||||
'L' => 'Νότιο Αιγαίο',
|
||||
'M' => 'Κρήτη',
|
||||
];
|
||||
7
Modules/Support/Resources/states/HK.php
Normal file
7
Modules/Support/Resources/states/HK.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'HONG KONG' => 'Hong Kong Island',
|
||||
'KOWLOON' => 'Kowloon',
|
||||
'NEW TERRITORIES' => 'New Territories',
|
||||
];
|
||||
24
Modules/Support/Resources/states/HU.php
Normal file
24
Modules/Support/Resources/states/HU.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'BK' => 'Bács-Kiskun',
|
||||
'BE' => 'Békés',
|
||||
'BA' => 'Baranya',
|
||||
'BZ' => 'Borsod-Abaúj-Zemplén',
|
||||
'BU' => 'Budapest',
|
||||
'CS' => 'Csongrád',
|
||||
'FE' => 'Fejér',
|
||||
'GS' => 'Győr-Moson-Sopron',
|
||||
'HB' => 'Hajdú-Bihar',
|
||||
'HE' => 'Heves',
|
||||
'JN' => 'Jász-Nagykun-Szolnok',
|
||||
'KE' => 'Komárom-Esztergom',
|
||||
'NO' => 'Nógrád',
|
||||
'PE' => 'Pest',
|
||||
'SO' => 'Somogy',
|
||||
'SZ' => 'Szabolcs-Szatmár-Bereg',
|
||||
'TO' => 'Tolna',
|
||||
'VA' => 'Vas',
|
||||
'VE' => 'Veszprém',
|
||||
'ZA' => 'Zala',
|
||||
];
|
||||
38
Modules/Support/Resources/states/ID.php
Normal file
38
Modules/Support/Resources/states/ID.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AC' => 'Daerah Istimewa Aceh',
|
||||
'SU' => 'Sumatera Utara',
|
||||
'SB' => 'Sumatera Barat',
|
||||
'RI' => 'Riau',
|
||||
'KR' => 'Kepulauan Riau',
|
||||
'JA' => 'Jambi',
|
||||
'SS' => 'Sumatera Selatan',
|
||||
'BB' => 'Bangka Belitung',
|
||||
'BE' => 'Bengkulu',
|
||||
'LA' => 'Lampung',
|
||||
'JK' => 'DKI Jakarta',
|
||||
'JB' => 'Jawa Barat',
|
||||
'BT' => 'Banten',
|
||||
'JT' => 'Jawa Tengah',
|
||||
'JI' => 'Jawa Timur',
|
||||
'YO' => 'Daerah Istimewa Yogyakarta',
|
||||
'BA' => 'Bali',
|
||||
'NB' => 'Nusa Tenggara Barat',
|
||||
'NT' => 'Nusa Tenggara Timur',
|
||||
'KB' => 'Kalimantan Barat',
|
||||
'KT' => 'Kalimantan Tengah',
|
||||
'KI' => 'Kalimantan Timur',
|
||||
'KS' => 'Kalimantan Selatan',
|
||||
'KU' => 'Kalimantan Utara',
|
||||
'SA' => 'Sulawesi Utara',
|
||||
'ST' => 'Sulawesi Tengah',
|
||||
'SG' => 'Sulawesi Tenggara',
|
||||
'SR' => 'Sulawesi Barat',
|
||||
'SN' => 'Sulawesi Selatan',
|
||||
'GO' => 'Gorontalo',
|
||||
'MA' => 'Maluku',
|
||||
'MU' => 'Maluku Utara',
|
||||
'PA' => 'Papua',
|
||||
'PB' => 'Papua Barat',
|
||||
];
|
||||
30
Modules/Support/Resources/states/IE.php
Normal file
30
Modules/Support/Resources/states/IE.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'CW' => 'Carlow',
|
||||
'CN' => 'Cavan',
|
||||
'CE' => 'Clare',
|
||||
'CK' => 'Cork',
|
||||
'DL' => 'Donegal',
|
||||
'DN' => 'Dublin',
|
||||
'GY' => 'Galway',
|
||||
'KY' => 'Kerry',
|
||||
'KE' => 'Kildare',
|
||||
'KK' => 'Kilkenny',
|
||||
'LS' => 'Laois',
|
||||
'LM' => 'Leitrim',
|
||||
'LK' => 'Limerick',
|
||||
'LD' => 'Longford',
|
||||
'LH' => 'Louth',
|
||||
'MO' => 'Mayo',
|
||||
'MH' => 'Meath',
|
||||
'MN' => 'Monaghan',
|
||||
'OY' => 'Offaly',
|
||||
'RN' => 'Roscommon',
|
||||
'SO' => 'Sligo',
|
||||
'TY' => 'Tipperary',
|
||||
'WD' => 'Waterford',
|
||||
'WH' => 'Westmeath',
|
||||
'WX' => 'Wexford',
|
||||
'WW' => 'Wicklow',
|
||||
];
|
||||
40
Modules/Support/Resources/states/IN.php
Normal file
40
Modules/Support/Resources/states/IN.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AP' => 'Andhra Pradesh',
|
||||
'AR' => 'Arunachal Pradesh',
|
||||
'AS' => 'Assam',
|
||||
'BR' => 'Bihar',
|
||||
'CT' => 'Chhattisgarh',
|
||||
'GA' => 'Goa',
|
||||
'GJ' => 'Gujarat',
|
||||
'HR' => 'Haryana',
|
||||
'HP' => 'Himachal Pradesh',
|
||||
'JK' => 'Jammu and Kashmir',
|
||||
'JH' => 'Jharkhand',
|
||||
'KA' => 'Karnataka',
|
||||
'KL' => 'Kerala',
|
||||
'MP' => 'Madhya Pradesh',
|
||||
'MH' => 'Maharashtra',
|
||||
'MN' => 'Manipur',
|
||||
'ML' => 'Meghalaya',
|
||||
'MZ' => 'Mizoram',
|
||||
'NL' => 'Nagaland',
|
||||
'OR' => 'Orissa',
|
||||
'PB' => 'Punjab',
|
||||
'RJ' => 'Rajasthan',
|
||||
'SK' => 'Sikkim',
|
||||
'TN' => 'Tamil Nadu',
|
||||
'TS' => 'Telangana',
|
||||
'TR' => 'Tripura',
|
||||
'UK' => 'Uttarakhand',
|
||||
'UP' => 'Uttar Pradesh',
|
||||
'WB' => 'West Bengal',
|
||||
'AN' => 'Andaman and Nicobar Islands',
|
||||
'CH' => 'Chandigarh',
|
||||
'DN' => 'Dadra and Nagar Haveli',
|
||||
'DD' => 'Daman and Diu',
|
||||
'DL' => 'Delhi',
|
||||
'LD' => 'Lakshadeep',
|
||||
'PY' => 'Pondicherry (Puducherry)',
|
||||
];
|
||||
35
Modules/Support/Resources/states/IR.php
Normal file
35
Modules/Support/Resources/states/IR.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'KHZ' => 'Khuzestan',
|
||||
'THR' => 'Tehran',
|
||||
'ILM' => 'Ilaam',
|
||||
'BHR' => 'Bushehr',
|
||||
'ADL' => 'Ardabil',
|
||||
'ESF' => 'Isfahan',
|
||||
'YZD' => 'Yazd',
|
||||
'KRH' => 'Kermanshah',
|
||||
'KRN' => 'Kerman',
|
||||
'HDN' => 'Hamadan',
|
||||
'GZN' => 'Ghazvin',
|
||||
'ZJN' => 'Zanjan',
|
||||
'LRS' => 'Luristan',
|
||||
'ABZ' => 'Alborz',
|
||||
'EAZ' => 'East Azarbaijan',
|
||||
'WAZ' => 'West Azarbaijan',
|
||||
'CHB' => 'Chaharmahal and Bakhtiari',
|
||||
'SKH' => 'South Khorasan',
|
||||
'RKH' => 'Razavi Khorasan',
|
||||
'NKH' => 'North Khorasan',
|
||||
'SMN' => 'Semnan',
|
||||
'FRS' => 'Fars',
|
||||
'QHM' => 'Qom',
|
||||
'KRD' => 'Kurdistan',
|
||||
'KBD' => 'Kohgiluyeh and BoyerAhmad',
|
||||
'GLS' => 'Golestan',
|
||||
'GIL' => 'Gilan',
|
||||
'MZN' => 'Mazandaran',
|
||||
'MKZ' => 'Markazi',
|
||||
'HRZ' => 'Hormozgan',
|
||||
'SBN' => 'Sistan and Baluchestan',
|
||||
];
|
||||
113
Modules/Support/Resources/states/IT.php
Normal file
113
Modules/Support/Resources/states/IT.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AG' => 'Agrigento',
|
||||
'AL' => 'Alessandria',
|
||||
'AN' => 'Ancona',
|
||||
'AO' => 'Aosta',
|
||||
'AR' => 'Arezzo',
|
||||
'AP' => 'Ascoli Piceno',
|
||||
'AT' => 'Asti',
|
||||
'AV' => 'Avellino',
|
||||
'BA' => 'Bari',
|
||||
'BT' => 'Barletta-Andria-Trani',
|
||||
'BL' => 'Belluno',
|
||||
'BN' => 'Benevento',
|
||||
'BG' => 'Bergamo',
|
||||
'BI' => 'Biella',
|
||||
'BO' => 'Bologna',
|
||||
'BZ' => 'Bolzano',
|
||||
'BS' => 'Brescia',
|
||||
'BR' => 'Brindisi',
|
||||
'CA' => 'Cagliari',
|
||||
'CL' => 'Caltanissetta',
|
||||
'CB' => 'Campobasso',
|
||||
'CI' => 'Carbonia-Iglesias',
|
||||
'CE' => 'Caserta',
|
||||
'CT' => 'Catania',
|
||||
'CZ' => 'Catanzaro',
|
||||
'CH' => 'Chieti',
|
||||
'CO' => 'Como',
|
||||
'CS' => 'Cosenza',
|
||||
'CR' => 'Cremona',
|
||||
'KR' => 'Crotone',
|
||||
'CN' => 'Cuneo',
|
||||
'EN' => 'Enna',
|
||||
'FM' => 'Fermo',
|
||||
'FE' => 'Ferrara',
|
||||
'FI' => 'Firenze',
|
||||
'FG' => 'Foggia',
|
||||
'FC' => 'Forlì-Cesena',
|
||||
'FR' => 'Frosinone',
|
||||
'GE' => 'Genova',
|
||||
'GO' => 'Gorizia',
|
||||
'GR' => 'Grosseto',
|
||||
'IM' => 'Imperia',
|
||||
'IS' => 'Isernia',
|
||||
'SP' => 'La Spezia',
|
||||
'LT' => 'Latina',
|
||||
'LE' => 'Lecce',
|
||||
'LC' => 'Lecco',
|
||||
'LI' => 'Livorno',
|
||||
'LO' => 'Lodi',
|
||||
'LU' => 'Lucca',
|
||||
'MC' => 'Macerata',
|
||||
'MN' => 'Mantova',
|
||||
'MS' => 'Massa-Carrara',
|
||||
'MT' => 'Matera',
|
||||
'ME' => 'Messina',
|
||||
'MI' => 'Milano',
|
||||
'MO' => 'Modena',
|
||||
'MB' => 'Monza e della Brianza',
|
||||
'NA' => 'Napoli',
|
||||
'NO' => 'Novara',
|
||||
'NU' => 'Nuoro',
|
||||
'OT' => 'Olbia-Tempio',
|
||||
'OR' => 'Oristano',
|
||||
'PD' => 'Padova',
|
||||
'PA' => 'Palermo',
|
||||
'PR' => 'Parma',
|
||||
'PV' => 'Pavia',
|
||||
'PG' => 'Perugia',
|
||||
'PU' => 'Pesaro e Urbino',
|
||||
'PE' => 'Pescara',
|
||||
'PC' => 'Piacenza',
|
||||
'PI' => 'Pisa',
|
||||
'PT' => 'Pistoia',
|
||||
'PN' => 'Pordenone',
|
||||
'PZ' => 'Potenza',
|
||||
'PO' => 'Prato',
|
||||
'RG' => 'Ragusa',
|
||||
'RA' => 'Ravenna',
|
||||
'RC' => 'Reggio Calabria',
|
||||
'RE' => 'Reggio Emilia',
|
||||
'RI' => 'Rieti',
|
||||
'RN' => 'Rimini',
|
||||
'RM' => 'Roma',
|
||||
'RO' => 'Rovigo',
|
||||
'SA' => 'Salerno',
|
||||
'VS' => 'Medio Campidano',
|
||||
'SS' => 'Sassari',
|
||||
'SV' => 'Savona',
|
||||
'SI' => 'Siena',
|
||||
'SR' => 'Siracusa',
|
||||
'SO' => 'Sondrio',
|
||||
'TA' => 'Taranto',
|
||||
'TE' => 'Teramo',
|
||||
'TR' => 'Terni',
|
||||
'TO' => 'Torino',
|
||||
'OG' => 'Ogliastra',
|
||||
'TP' => 'Trapani',
|
||||
'TN' => 'Trento',
|
||||
'TV' => 'Treviso',
|
||||
'TS' => 'Trieste',
|
||||
'UD' => 'Udine',
|
||||
'VA' => 'Varese',
|
||||
'VE' => 'Venezia',
|
||||
'VB' => 'Verbano-Cusio-Ossola',
|
||||
'VC' => 'Vercelli',
|
||||
'VR' => 'Verona',
|
||||
'VV' => 'Vibo Valentia',
|
||||
'VI' => 'Vicenza',
|
||||
'VT' => 'Viterbo',
|
||||
];
|
||||
51
Modules/Support/Resources/states/JP.php
Normal file
51
Modules/Support/Resources/states/JP.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'JP01' => 'Hokkaido',
|
||||
'JP02' => 'Aomori',
|
||||
'JP03' => 'Iwate',
|
||||
'JP04' => 'Miyagi',
|
||||
'JP05' => 'Akita',
|
||||
'JP06' => 'Yamagata',
|
||||
'JP07' => 'Fukushima',
|
||||
'JP08' => 'Ibaraki',
|
||||
'JP09' => 'Tochigi',
|
||||
'JP10' => 'Gunma',
|
||||
'JP11' => 'Saitama',
|
||||
'JP12' => 'Chiba',
|
||||
'JP13' => 'Tokyo',
|
||||
'JP14' => 'Kanagawa',
|
||||
'JP15' => 'Niigata',
|
||||
'JP16' => 'Toyama',
|
||||
'JP17' => 'Ishikawa',
|
||||
'JP18' => 'Fukui',
|
||||
'JP19' => 'Yamanashi',
|
||||
'JP20' => 'Nagano',
|
||||
'JP21' => 'Gifu',
|
||||
'JP22' => 'Shizuoka',
|
||||
'JP23' => 'Aichi',
|
||||
'JP24' => 'Mie',
|
||||
'JP25' => 'Shiga',
|
||||
'JP26' => 'Kyoto',
|
||||
'JP27' => 'Osaka',
|
||||
'JP28' => 'Hyogo',
|
||||
'JP29' => 'Nara',
|
||||
'JP30' => 'Wakayama',
|
||||
'JP31' => 'Tottori',
|
||||
'JP32' => 'Shimane',
|
||||
'JP33' => 'Okayama',
|
||||
'JP34' => 'Hiroshima',
|
||||
'JP35' => 'Yamaguchi',
|
||||
'JP36' => 'Tokushima',
|
||||
'JP37' => 'Kagawa',
|
||||
'JP38' => 'Ehime',
|
||||
'JP39' => 'Kochi',
|
||||
'JP40' => 'Fukuoka',
|
||||
'JP41' => 'Saga',
|
||||
'JP42' => 'Nagasaki',
|
||||
'JP43' => 'Kumamoto',
|
||||
'JP44' => 'Oita',
|
||||
'JP45' => 'Miyazaki',
|
||||
'JP46' => 'Kagoshima',
|
||||
'JP47' => 'Okinawa',
|
||||
];
|
||||
39
Modules/Support/Resources/states/MD.php
Normal file
39
Modules/Support/Resources/states/MD.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'C' => 'Chișinău',
|
||||
'BL' => 'Bălți',
|
||||
'AN' => 'Anenii Noi',
|
||||
'BS' => 'Basarabeasca',
|
||||
'BR' => 'Briceni',
|
||||
'CH' => 'Cahul',
|
||||
'CT' => 'Cantemir',
|
||||
'CL' => 'Călărași',
|
||||
'CS' => 'Căușeni',
|
||||
'CM' => 'Cimișlia',
|
||||
'CR' => 'Criuleni',
|
||||
'DN' => 'Dondușeni',
|
||||
'DR' => 'Drochia',
|
||||
'DB' => 'Dubăsari',
|
||||
'ED' => 'Edineț',
|
||||
'FL' => 'Fălești',
|
||||
'FR' => 'Florești',
|
||||
'GE' => 'UTA Găgăuzia',
|
||||
'GL' => 'Glodeni',
|
||||
'HN' => 'Hîncești',
|
||||
'IL' => 'Ialoveni',
|
||||
'LV' => 'Leova',
|
||||
'NS' => 'Nisporeni',
|
||||
'OC' => 'Ocnița',
|
||||
'OR' => 'Orhei',
|
||||
'RZ' => 'Rezina',
|
||||
'RS' => 'Rîșcani',
|
||||
'SG' => 'Sîngerei',
|
||||
'SR' => 'Soroca',
|
||||
'ST' => 'Strășeni',
|
||||
'SD' => 'Șoldănești',
|
||||
'SV' => 'Ștefan Vodă',
|
||||
'TR' => 'Taraclia',
|
||||
'TL' => 'Telenești',
|
||||
'UN' => 'Ungheni',
|
||||
];
|
||||
36
Modules/Support/Resources/states/MX.php
Normal file
36
Modules/Support/Resources/states/MX.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'DF' => 'Ciudad de México',
|
||||
'JA' => 'Jalisco',
|
||||
'NL' => 'Nuevo León',
|
||||
'AG' => 'Aguascalientes',
|
||||
'BC' => 'Baja California',
|
||||
'BS' => 'Baja California Sur',
|
||||
'CM' => 'Campeche',
|
||||
'CS' => 'Chiapas',
|
||||
'CH' => 'Chihuahua',
|
||||
'CO' => 'Coahuila',
|
||||
'CL' => 'Colima',
|
||||
'DG' => 'Durango',
|
||||
'GT' => 'Guanajuato',
|
||||
'GR' => 'Guerrero',
|
||||
'HG' => 'Hidalgo',
|
||||
'MX' => 'Estado de México',
|
||||
'MI' => 'Michoacán',
|
||||
'MO' => 'Morelos',
|
||||
'NA' => 'Nayarit',
|
||||
'OA' => 'Oaxaca',
|
||||
'PU' => 'Puebla',
|
||||
'QT' => 'Querétaro',
|
||||
'QR' => 'Quintana Roo',
|
||||
'SL' => 'San Luis Potosí',
|
||||
'SI' => 'Sinaloa',
|
||||
'SO' => 'Sonora',
|
||||
'TB' => 'Tabasco',
|
||||
'TM' => 'Tamaulipas',
|
||||
'TL' => 'Tlaxcala',
|
||||
'VE' => 'Veracruz',
|
||||
'YU' => 'Yucatán',
|
||||
'ZA' => 'Zacatecas',
|
||||
];
|
||||
20
Modules/Support/Resources/states/MY.php
Normal file
20
Modules/Support/Resources/states/MY.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'JHR' => 'Johor',
|
||||
'KDH' => 'Kedah',
|
||||
'KTN' => 'Kelantan',
|
||||
'LBN' => 'Labuan',
|
||||
'MLK' => 'Malacca (Melaka)',
|
||||
'NSN' => 'Negeri Sembilan',
|
||||
'PHG' => 'Pahang',
|
||||
'PNG' => 'Penang (Pulau Pinang)',
|
||||
'PRK' => 'Perak',
|
||||
'PLS' => 'Perlis',
|
||||
'SBH' => 'Sabah',
|
||||
'SWK' => 'Sarawak',
|
||||
'SGR' => 'Selangor',
|
||||
'TRG' => 'Terengganu',
|
||||
'PJY' => 'Putrajaya',
|
||||
'KUL' => 'Kuala Lumpur',
|
||||
];
|
||||
41
Modules/Support/Resources/states/NG.php
Normal file
41
Modules/Support/Resources/states/NG.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AB' => 'Abia',
|
||||
'FC' => 'Abuja',
|
||||
'AD' => 'Adamawa',
|
||||
'AK' => 'Akwa Ibom',
|
||||
'AN' => 'Anambra',
|
||||
'BA' => 'Bauchi',
|
||||
'BY' => 'Bayelsa',
|
||||
'BE' => 'Benue',
|
||||
'BO' => 'Borno',
|
||||
'CR' => 'Cross River',
|
||||
'DE' => 'Delta',
|
||||
'EB' => 'Ebonyi',
|
||||
'ED' => 'Edo',
|
||||
'EK' => 'Ekiti',
|
||||
'EN' => 'Enugu',
|
||||
'GO' => 'Gombe',
|
||||
'IM' => 'Imo',
|
||||
'JI' => 'Jigawa',
|
||||
'KD' => 'Kaduna',
|
||||
'KN' => 'Kano',
|
||||
'KT' => 'Katsina',
|
||||
'KE' => 'Kebbi',
|
||||
'KO' => 'Kogi',
|
||||
'KW' => 'Kwara',
|
||||
'LA' => 'Lagos',
|
||||
'NA' => 'Nasarawa',
|
||||
'NI' => 'Niger',
|
||||
'OG' => 'Ogun',
|
||||
'ON' => 'Ondo',
|
||||
'OS' => 'Osun',
|
||||
'OY' => 'Oyo',
|
||||
'PL' => 'Plateau',
|
||||
'RI' => 'Rivers',
|
||||
'SO' => 'Sokoto',
|
||||
'TA' => 'Taraba',
|
||||
'YO' => 'Yobe',
|
||||
'ZA' => 'Zamfara',
|
||||
];
|
||||
11
Modules/Support/Resources/states/NP.php
Normal file
11
Modules/Support/Resources/states/NP.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'PR1' => 'Province 1',
|
||||
'PR2' => 'Province 2',
|
||||
'PR3' => 'Bagmati',
|
||||
'PR4' => 'Gandaki',
|
||||
'PR5' => 'Lumbini',
|
||||
'PR6' => 'Karnali',
|
||||
'PR7' => 'Sudurpaschim',
|
||||
];
|
||||
20
Modules/Support/Resources/states/NZ.php
Normal file
20
Modules/Support/Resources/states/NZ.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'NL' => 'Northland',
|
||||
'AK' => 'Auckland',
|
||||
'WA' => 'Waikato',
|
||||
'BP' => 'Bay of Plenty',
|
||||
'TK' => 'Taranaki',
|
||||
'GI' => 'Gisborne',
|
||||
'HB' => 'Hawke’s Bay',
|
||||
'MW' => 'Manawatu-Wanganui',
|
||||
'WE' => 'Wellington',
|
||||
'NS' => 'Nelson',
|
||||
'MB' => 'Marlborough',
|
||||
'TM' => 'Tasman',
|
||||
'WC' => 'West Coast',
|
||||
'CT' => 'Canterbury',
|
||||
'OT' => 'Otago',
|
||||
'SL' => 'Southland',
|
||||
];
|
||||
30
Modules/Support/Resources/states/PE.php
Normal file
30
Modules/Support/Resources/states/PE.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'CAL' => 'El Callao',
|
||||
'LMA' => 'Municipalidad Metropolitana de Lima',
|
||||
'AMA' => 'Amazonas',
|
||||
'ANC' => 'Ancash',
|
||||
'APU' => 'Apurímac',
|
||||
'ARE' => 'Arequipa',
|
||||
'AYA' => 'Ayacucho',
|
||||
'CAJ' => 'Cajamarca',
|
||||
'CUS' => 'Cusco',
|
||||
'HUV' => 'Huancavelica',
|
||||
'HUC' => 'Huánuco',
|
||||
'ICA' => 'Ica',
|
||||
'JUN' => 'Junín',
|
||||
'LAL' => 'La Libertad',
|
||||
'LAM' => 'Lambayeque',
|
||||
'LIM' => 'Lima',
|
||||
'LOR' => 'Loreto',
|
||||
'MDD' => 'Madre de Dios',
|
||||
'MOQ' => 'Moquegua',
|
||||
'PAS' => 'Pasco',
|
||||
'PIU' => 'Piura',
|
||||
'PUN' => 'Puno',
|
||||
'SAM' => 'San Martín',
|
||||
'TAC' => 'Tacna',
|
||||
'TUM' => 'Tumbes',
|
||||
'UCA' => 'Ucayali',
|
||||
];
|
||||
86
Modules/Support/Resources/states/PH.php
Normal file
86
Modules/Support/Resources/states/PH.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ABR' => 'Abra',
|
||||
'AGN' => 'Agusan del Norte',
|
||||
'AGS' => 'Agusan del Sur',
|
||||
'AKL' => 'Aklan',
|
||||
'ALB' => 'Albay',
|
||||
'ANT' => 'Antique',
|
||||
'APA' => 'Apayao',
|
||||
'AUR' => 'Aurora',
|
||||
'BAS' => 'Basilan',
|
||||
'BAN' => 'Bataan',
|
||||
'BTN' => 'Batanes',
|
||||
'BTG' => 'Batangas',
|
||||
'BEN' => 'Benguet',
|
||||
'BIL' => 'Biliran',
|
||||
'BOH' => 'Bohol',
|
||||
'BUK' => 'Bukidnon',
|
||||
'BUL' => 'Bulacan',
|
||||
'CAG' => 'Cagayan',
|
||||
'CAN' => 'Camarines Norte',
|
||||
'CAS' => 'Camarines Sur',
|
||||
'CAM' => 'Camiguin',
|
||||
'CAP' => 'Capiz',
|
||||
'CAT' => 'Catanduanes',
|
||||
'CAV' => 'Cavite',
|
||||
'CEB' => 'Cebu',
|
||||
'COM' => 'Compostela Valley',
|
||||
'NCO' => 'Cotabato',
|
||||
'DAV' => 'Davao del Norte',
|
||||
'DAS' => 'Davao del Sur',
|
||||
'DAC' => 'Davao Occidental',
|
||||
'DAO' => 'Davao Oriental',
|
||||
'DIN' => 'Dinagat Islands',
|
||||
'EAS' => 'Eastern Samar',
|
||||
'GUI' => 'Guimaras',
|
||||
'IFU' => 'Ifugao',
|
||||
'ILN' => 'Ilocos Norte',
|
||||
'ILS' => 'Ilocos Sur',
|
||||
'ILI' => 'Iloilo',
|
||||
'ISA' => 'Isabela',
|
||||
'KAL' => 'Kalinga',
|
||||
'LUN' => 'La Union',
|
||||
'LAG' => 'Laguna',
|
||||
'LAN' => 'Lanao del Norte',
|
||||
'LAS' => 'Lanao del Sur',
|
||||
'LEY' => 'Leyte',
|
||||
'MAG' => 'Maguindanao',
|
||||
'MAD' => 'Marinduque',
|
||||
'MAS' => 'Masbate',
|
||||
'MSC' => 'Misamis Occidental',
|
||||
'MSR' => 'Misamis Oriental',
|
||||
'MOU' => 'Mountain Province',
|
||||
'NEC' => 'Negros Occidental',
|
||||
'NER' => 'Negros Oriental',
|
||||
'NSA' => 'Northern Samar',
|
||||
'NUE' => 'Nueva Ecija',
|
||||
'NUV' => 'Nueva Vizcaya',
|
||||
'MDC' => 'Occidental Mindoro',
|
||||
'MDR' => 'Oriental Mindoro',
|
||||
'PLW' => 'Palawan',
|
||||
'PAM' => 'Pampanga',
|
||||
'PAN' => 'Pangasinan',
|
||||
'QUE' => 'Quezon',
|
||||
'QUI' => 'Quirino',
|
||||
'RIZ' => 'Rizal',
|
||||
'ROM' => 'Romblon',
|
||||
'WSA' => 'Samar',
|
||||
'SAR' => 'Sarangani',
|
||||
'SIQ' => 'Siquijor',
|
||||
'SOR' => 'Sorsogon',
|
||||
'SCO' => 'South Cotabato',
|
||||
'SLE' => 'Southern Leyte',
|
||||
'SUK' => 'Sultan Kudarat',
|
||||
'SLU' => 'Sulu',
|
||||
'SUN' => 'Surigao del Norte',
|
||||
'SUR' => 'Surigao del Sur',
|
||||
'TAR' => 'Tarlac',
|
||||
'TAW' => 'Tawi-Tawi',
|
||||
'ZMB' => 'Zambales',
|
||||
'ZAN' => 'Zamboanga del Norte',
|
||||
'ZAS' => 'Zamboanga del Sur',
|
||||
'ZSI' => 'Zamboanga Sibugay',
|
||||
'00' => 'Metro Manila',
|
||||
];
|
||||
12
Modules/Support/Resources/states/PK.php
Normal file
12
Modules/Support/Resources/states/PK.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'JK' => 'Azad Kashmir',
|
||||
'BA' => 'Balochistan',
|
||||
'TA' => 'FATA',
|
||||
'GB' => 'Gilgit Baltistan',
|
||||
'IS' => 'Islamabad Capital Territory',
|
||||
'KP' => 'Khyber Pakhtunkhwa',
|
||||
'PB' => 'Punjab',
|
||||
'SD' => 'Sindh',
|
||||
];
|
||||
46
Modules/Support/Resources/states/RO.php
Normal file
46
Modules/Support/Resources/states/RO.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AB' => 'Alba',
|
||||
'AR' => 'Arad',
|
||||
'AG' => 'Argeș',
|
||||
'BC' => 'Bacău',
|
||||
'BH' => 'Bihor',
|
||||
'BN' => 'Bistrița-Năsăud',
|
||||
'BT' => 'Botoșani',
|
||||
'BR' => 'Brăila',
|
||||
'BV' => 'Brașov',
|
||||
'B' => 'București',
|
||||
'BZ' => 'Buzău',
|
||||
'CL' => 'Călărași',
|
||||
'CS' => 'Caraș-Severin',
|
||||
'CJ' => 'Cluj',
|
||||
'CT' => 'Constanța',
|
||||
'CV' => 'Covasna',
|
||||
'DB' => 'Dâmbovița',
|
||||
'DJ' => 'Dolj',
|
||||
'GL' => 'Galați',
|
||||
'GR' => 'Giurgiu',
|
||||
'GJ' => 'Gorj',
|
||||
'HR' => 'Harghita',
|
||||
'HD' => 'Hunedoara',
|
||||
'IL' => 'Ialomița',
|
||||
'IS' => 'Iași',
|
||||
'IF' => 'Ilfov',
|
||||
'MM' => 'Maramureș',
|
||||
'MH' => 'Mehedinți',
|
||||
'MS' => 'Mureș',
|
||||
'NT' => 'Neamț',
|
||||
'OT' => 'Olt',
|
||||
'PH' => 'Prahova',
|
||||
'SJ' => 'Sălaj',
|
||||
'SM' => 'Satu Mare',
|
||||
'SB' => 'Sibiu',
|
||||
'SV' => 'Suceava',
|
||||
'TR' => 'Teleorman',
|
||||
'TM' => 'Timiș',
|
||||
'TL' => 'Tulcea',
|
||||
'VL' => 'Vâlcea',
|
||||
'VS' => 'Vaslui',
|
||||
'VN' => 'Vrancea',
|
||||
];
|
||||
17
Modules/Support/Resources/states/SA.php
Normal file
17
Modules/Support/Resources/states/SA.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'RD' => 'Riyadh',
|
||||
'MQ' => 'Makkah',
|
||||
'MN' => 'Madinah',
|
||||
'QA' => 'Qassim',
|
||||
'SQ' => 'Eastern Province',
|
||||
'AS' => 'Asir',
|
||||
'TB' => 'Tabuk',
|
||||
'HA' => 'Hail',
|
||||
'SH' => 'Northern Borders',
|
||||
'GA' => 'Jazan',
|
||||
'NG' => 'Najran',
|
||||
'BA' => 'Bahah',
|
||||
'GO' => 'Jawf',
|
||||
];
|
||||
81
Modules/Support/Resources/states/TH.php
Normal file
81
Modules/Support/Resources/states/TH.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'TH-37' => 'Amnat Charoen',
|
||||
'TH-15' => 'Ang Thong',
|
||||
'TH-14' => 'Ayutthaya',
|
||||
'TH-10' => 'Bangkok',
|
||||
'TH-38' => 'Bueng Kan',
|
||||
'TH-31' => 'Buri Ram',
|
||||
'TH-24' => 'Chachoengsao',
|
||||
'TH-18' => 'Chai Nat',
|
||||
'TH-36' => 'Chaiyaphum',
|
||||
'TH-22' => 'Chanthaburi',
|
||||
'TH-50' => 'Chiang Mai',
|
||||
'TH-57' => 'Chiang Rai',
|
||||
'TH-20' => 'Chonburi',
|
||||
'TH-86' => 'Chumphon',
|
||||
'TH-46' => 'Kalasin',
|
||||
'TH-62' => 'Kamphaeng Phet',
|
||||
'TH-71' => 'Kanchanaburi',
|
||||
'TH-40' => 'Khon Kaen',
|
||||
'TH-81' => 'Krabi',
|
||||
'TH-52' => 'Lampang',
|
||||
'TH-51' => 'Lamphun',
|
||||
'TH-42' => 'Loei',
|
||||
'TH-16' => 'Lopburi',
|
||||
'TH-58' => 'Mae Hong Son',
|
||||
'TH-44' => 'Maha Sarakham',
|
||||
'TH-49' => 'Mukdahan',
|
||||
'TH-26' => 'Nakhon Nayok',
|
||||
'TH-73' => 'Nakhon Pathom',
|
||||
'TH-48' => 'Nakhon Phanom',
|
||||
'TH-30' => 'Nakhon Ratchasima',
|
||||
'TH-60' => 'Nakhon Sawan',
|
||||
'TH-80' => 'Nakhon Si Thammarat',
|
||||
'TH-55' => 'Nan',
|
||||
'TH-96' => 'Narathiwat',
|
||||
'TH-39' => 'Nong Bua Lam Phu',
|
||||
'TH-43' => 'Nong Khai',
|
||||
'TH-12' => 'Nonthaburi',
|
||||
'TH-13' => 'Pathum Thani',
|
||||
'TH-94' => 'Pattani',
|
||||
'TH-82' => 'Phang Nga',
|
||||
'TH-93' => 'Phatthalung',
|
||||
'TH-56' => 'Phayao',
|
||||
'TH-67' => 'Phetchabun',
|
||||
'TH-76' => 'Phetchaburi',
|
||||
'TH-66' => 'Phichit',
|
||||
'TH-65' => 'Phitsanulok',
|
||||
'TH-54' => 'Phrae',
|
||||
'TH-83' => 'Phuket',
|
||||
'TH-25' => 'Prachin Buri',
|
||||
'TH-77' => 'Prachuap Khiri Khan',
|
||||
'TH-85' => 'Ranong',
|
||||
'TH-70' => 'Ratchaburi',
|
||||
'TH-21' => 'Rayong',
|
||||
'TH-45' => 'Roi Et',
|
||||
'TH-27' => 'Sa Kaeo',
|
||||
'TH-47' => 'Sakon Nakhon',
|
||||
'TH-11' => 'Samut Prakan',
|
||||
'TH-74' => 'Samut Sakhon',
|
||||
'TH-75' => 'Samut Songkhram',
|
||||
'TH-19' => 'Saraburi',
|
||||
'TH-91' => 'Satun',
|
||||
'TH-17' => 'Sing Buri',
|
||||
'TH-33' => 'Sisaket',
|
||||
'TH-90' => 'Songkhla',
|
||||
'TH-64' => 'Sukhothai',
|
||||
'TH-72' => 'Suphan Buri',
|
||||
'TH-84' => 'Surat Thani',
|
||||
'TH-32' => 'Surin',
|
||||
'TH-63' => 'Tak',
|
||||
'TH-92' => 'Trang',
|
||||
'TH-23' => 'Trat',
|
||||
'TH-34' => 'Ubon Ratchathani',
|
||||
'TH-41' => 'Udon Thani',
|
||||
'TH-61' => 'Uthai Thani',
|
||||
'TH-53' => 'Uttaradit',
|
||||
'TH-95' => 'Yala',
|
||||
'TH-35' => 'Yasothon',
|
||||
];
|
||||
85
Modules/Support/Resources/states/TR.php
Normal file
85
Modules/Support/Resources/states/TR.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'TR01' => 'Adana',
|
||||
'TR02' => 'Adıyaman',
|
||||
'TR03' => 'Afyon',
|
||||
'TR04' => 'Ağrı',
|
||||
'TR05' => 'Amasya',
|
||||
'TR06' => 'Ankara',
|
||||
'TR07' => 'Antalya',
|
||||
'TR08' => 'Artvin',
|
||||
'TR09' => 'Aydın',
|
||||
'TR10' => 'Balıkesir',
|
||||
'TR11' => 'Bilecik',
|
||||
'TR12' => 'Bingöl',
|
||||
'TR13' => 'Bitlis',
|
||||
'TR14' => 'Bolu',
|
||||
'TR15' => 'Burdur',
|
||||
'TR16' => 'Bursa',
|
||||
'TR17' => 'Çanakkale',
|
||||
'TR18' => 'Çankırı',
|
||||
'TR19' => 'Çorum',
|
||||
'TR20' => 'Denizli',
|
||||
'TR21' => 'Diyarbakır',
|
||||
'TR22' => 'Edirne',
|
||||
'TR23' => 'Elazığ',
|
||||
'TR24' => 'Erzincan',
|
||||
'TR25' => 'Erzurum',
|
||||
'TR26' => 'Eskişehir',
|
||||
'TR27' => 'Gaziantep',
|
||||
'TR28' => 'Giresun',
|
||||
'TR29' => 'Gümüşhane',
|
||||
'TR30' => 'Hakkari',
|
||||
'TR31' => 'Hatay',
|
||||
'TR32' => 'Isparta',
|
||||
'TR33' => 'Mersin',
|
||||
'TR34' => 'Istanbul',
|
||||
'TR35' => 'İzmir',
|
||||
'TR36' => 'Kars',
|
||||
'TR37' => 'Kastamonu',
|
||||
'TR38' => 'Kayseri',
|
||||
'TR39' => 'Kırklareli',
|
||||
'TR40' => 'Kırşehir',
|
||||
'TR41' => 'Kocaeli',
|
||||
'TR42' => 'Konya',
|
||||
'TR43' => 'Kütahya',
|
||||
'TR44' => 'Malatya',
|
||||
'TR45' => 'Manisa',
|
||||
'TR46' => 'Kahramanmaraş',
|
||||
'TR47' => 'Mardin',
|
||||
'TR48' => 'Muğla',
|
||||
'TR49' => 'Muş',
|
||||
'TR50' => 'Nevşehir',
|
||||
'TR51' => 'Niğde',
|
||||
'TR52' => 'Ordu',
|
||||
'TR53' => 'Rize',
|
||||
'TR54' => 'Sakarya',
|
||||
'TR55' => 'Samsun',
|
||||
'TR56' => 'Siirt',
|
||||
'TR57' => 'Sinop',
|
||||
'TR58' => 'Sivas',
|
||||
'TR59' => 'Tekirdağ',
|
||||
'TR60' => 'Tokat',
|
||||
'TR61' => 'Trabzon',
|
||||
'TR62' => 'Tunceli',
|
||||
'TR63' => 'Şanlıurfa',
|
||||
'TR64' => 'Uşak',
|
||||
'TR65' => 'Van',
|
||||
'TR66' => 'Yozgat',
|
||||
'TR67' => 'Zonguldak',
|
||||
'TR68' => 'Aksaray',
|
||||
'TR69' => 'Bayburt',
|
||||
'TR70' => 'Karaman',
|
||||
'TR71' => 'Kırıkkale',
|
||||
'TR72' => 'Batman',
|
||||
'TR73' => 'Şırnak',
|
||||
'TR74' => 'Bartın',
|
||||
'TR75' => 'Ardahan',
|
||||
'TR76' => 'Iğdır',
|
||||
'TR77' => 'Yalova',
|
||||
'TR78' => 'Karabük',
|
||||
'TR79' => 'Kilis',
|
||||
'TR80' => 'Osmaniye',
|
||||
'TR81' => 'Düzce',
|
||||
];
|
||||
34
Modules/Support/Resources/states/TZ.php
Normal file
34
Modules/Support/Resources/states/TZ.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'TZ01' => 'Arusha',
|
||||
'TZ02' => 'Dar es Salaam',
|
||||
'TZ03' => 'Dodoma',
|
||||
'TZ04' => 'Iringa',
|
||||
'TZ05' => 'Kagera',
|
||||
'TZ06' => 'Pemba North',
|
||||
'TZ07' => 'Zanzibar North',
|
||||
'TZ08' => 'Kigoma',
|
||||
'TZ09' => 'Kilimanjaro',
|
||||
'TZ10' => 'Pemba South',
|
||||
'TZ11' => 'Zanzibar South',
|
||||
'TZ12' => 'Lindi',
|
||||
'TZ13' => 'Mara',
|
||||
'TZ14' => 'Mbeya',
|
||||
'TZ15' => 'Zanzibar West',
|
||||
'TZ16' => 'Morogoro',
|
||||
'TZ17' => 'Mtwara',
|
||||
'TZ18' => 'Mwanza',
|
||||
'TZ19' => 'Coast',
|
||||
'TZ20' => 'Rukwa',
|
||||
'TZ21' => 'Ruvuma',
|
||||
'TZ22' => 'Shinyanga',
|
||||
'TZ23' => 'Singida',
|
||||
'TZ24' => 'Tabora',
|
||||
'TZ25' => 'Tanga',
|
||||
'TZ26' => 'Manyara',
|
||||
'TZ27' => 'Geita',
|
||||
'TZ28' => 'Katavi',
|
||||
'TZ29' => 'Njombe',
|
||||
'TZ30' => 'Simiyu',
|
||||
];
|
||||
58
Modules/Support/Resources/states/US.php
Normal file
58
Modules/Support/Resources/states/US.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'AL' => 'Alabama',
|
||||
'AK' => 'Alaska',
|
||||
'AZ' => 'Arizona',
|
||||
'AR' => 'Arkansas',
|
||||
'CA' => 'California',
|
||||
'CO' => 'Colorado',
|
||||
'CT' => 'Connecticut',
|
||||
'DE' => 'Delaware',
|
||||
'DC' => 'District Of Columbia',
|
||||
'FL' => 'Florida',
|
||||
'GA' => 'Georgia',
|
||||
'HI' => 'Hawaii',
|
||||
'ID' => 'Idaho',
|
||||
'IL' => 'Illinois',
|
||||
'IN' => 'Indiana',
|
||||
'IA' => 'Iowa',
|
||||
'KS' => 'Kansas',
|
||||
'KY' => 'Kentucky',
|
||||
'LA' => 'Louisiana',
|
||||
'ME' => 'Maine',
|
||||
'MD' => 'Maryland',
|
||||
'MA' => 'Massachusetts',
|
||||
'MI' => 'Michigan',
|
||||
'MN' => 'Minnesota',
|
||||
'MS' => 'Mississippi',
|
||||
'MO' => 'Missouri',
|
||||
'MT' => 'Montana',
|
||||
'NE' => 'Nebraska',
|
||||
'NV' => 'Nevada',
|
||||
'NH' => 'New Hampshire',
|
||||
'NJ' => 'New Jersey',
|
||||
'NM' => 'New Mexico',
|
||||
'NY' => 'New York',
|
||||
'NC' => 'North Carolina',
|
||||
'ND' => 'North Dakota',
|
||||
'OH' => 'Ohio',
|
||||
'OK' => 'Oklahoma',
|
||||
'OR' => 'Oregon',
|
||||
'PA' => 'Pennsylvania',
|
||||
'RI' => 'Rhode Island',
|
||||
'SC' => 'South Carolina',
|
||||
'SD' => 'South Dakota',
|
||||
'TN' => 'Tennessee',
|
||||
'TX' => 'Texas',
|
||||
'UT' => 'Utah',
|
||||
'VT' => 'Vermont',
|
||||
'VA' => 'Virginia',
|
||||
'WA' => 'Washington',
|
||||
'WV' => 'West Virginia',
|
||||
'WI' => 'Wisconsin',
|
||||
'WY' => 'Wyoming',
|
||||
'AA' => 'Armed Forces (AA)',
|
||||
'AE' => 'Armed Forces (AE)',
|
||||
'AP' => 'Armed Forces (AP)',
|
||||
];
|
||||
13
Modules/Support/Resources/states/ZA.php
Normal file
13
Modules/Support/Resources/states/ZA.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'EC' => 'Eastern Cape',
|
||||
'FS' => 'Free State',
|
||||
'GP' => 'Gauteng',
|
||||
'KZN' => 'KwaZulu-Natal',
|
||||
'LP' => 'Limpopo',
|
||||
'MP' => 'Mpumalanga',
|
||||
'NC' => 'Northern Cape',
|
||||
'NW' => 'North West',
|
||||
'WC' => 'Western Cape',
|
||||
];
|
||||
5
Modules/Support/Routes/public.php
Normal file
5
Modules/Support/Routes/public.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('countries/{code}/states', 'CountryStateController@index')->name('countries.states.index');
|
||||
115
Modules/Support/Search/Builder.php
Normal file
115
Modules/Support/Search/Builder.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Search;
|
||||
|
||||
class Builder
|
||||
{
|
||||
/**
|
||||
* The model instance.
|
||||
*
|
||||
* @var \Illuminate\Database\Eloquent\Model
|
||||
*/
|
||||
private $model;
|
||||
|
||||
/**
|
||||
* The scout builder instance.
|
||||
*
|
||||
* @var \Laravel\Scout\Builder
|
||||
*/
|
||||
private $scoutBuilder;
|
||||
|
||||
/**
|
||||
* Keys of search results.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $keys = [];
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param \Laravel\Scout\Builder $scoutBuilder
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($model, $scoutBuilder)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->scoutBuilder = $scoutBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply filter to the search results.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function filter($filter)
|
||||
{
|
||||
return $filter->apply($this->query());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the query builder of the model.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
$query = $this->model->whereIn($this->model->getQualifiedKeyName(), $this->keys());
|
||||
|
||||
if ($this->shouldOrderByRelevance()) {
|
||||
$this->orderByRelevance($query);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get keys of search result.
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function keys()
|
||||
{
|
||||
if (empty($this->keys)) {
|
||||
$this->keys = $this->scoutBuilder->keys();
|
||||
}
|
||||
|
||||
return $this->keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if query should order by relevance.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function shouldOrderByRelevance()
|
||||
{
|
||||
return ! request()->has('sort') || request('sort') === 'relevance';
|
||||
}
|
||||
|
||||
/**
|
||||
* Order query by relevance.
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query
|
||||
* @return void
|
||||
*/
|
||||
private function orderByRelevance($query)
|
||||
{
|
||||
$ids = $this->keys()->filter();
|
||||
|
||||
if ($ids->isNotEmpty()) {
|
||||
$query->orderByRaw("FIELD({$this->model->getQualifiedKeyName()}, {$ids->implode(',')})");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the results of the search.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
return $this->query()->get();
|
||||
}
|
||||
}
|
||||
173
Modules/Support/Search/MySqlSearchEngine.php
Normal file
173
Modules/Support/Search/MySqlSearchEngine.php
Normal file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Search;
|
||||
|
||||
use Laravel\Scout\Builder;
|
||||
use Laravel\Scout\Engines\Engine;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class MySqlSearchEngine extends Engine
|
||||
{
|
||||
public function update($models)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function delete($models)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Pluck and return the primary keys of the given results.
|
||||
*
|
||||
* @param mixed $results
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function mapIds($results)
|
||||
{
|
||||
return $results['results'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the given search on the engine.
|
||||
*
|
||||
* @param \Laravel\Scout\Builder $builder
|
||||
* @return mixed
|
||||
*/
|
||||
public function search(Builder $builder)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
$query = DB::table($builder->model->searchTable());
|
||||
|
||||
$columns = implode(',', $builder->model->searchColumns());
|
||||
|
||||
$query->whereRaw("MATCH ({$columns}) AGAINST (? IN BOOLEAN MODE)", $this->getSearchKeyword($builder));
|
||||
|
||||
if ($builder->callback) {
|
||||
$query = call_user_func($builder->callback, $query, $this);
|
||||
}
|
||||
|
||||
$result['count'] = $query->count();
|
||||
|
||||
if (property_exists($builder, 'orders') && ! empty($builder->orders)) {
|
||||
foreach ($builder->orders as $order) {
|
||||
$query->orderBy($order['column'], $order['direction']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($builder->limit) {
|
||||
$query = $query->take($builder->limit);
|
||||
}
|
||||
|
||||
if (property_exists($builder, 'offset') && $builder->offset) {
|
||||
$query = $query->skip($builder->offset);
|
||||
}
|
||||
|
||||
$result['results'] = $query->pluck($builder->model->searchKey());
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the search query.
|
||||
*
|
||||
* @param \Laravel\Scout\Builder $builder
|
||||
* @return string
|
||||
*/
|
||||
private function getSearchKeyword($builder)
|
||||
{
|
||||
if (is_null($builder->query)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return '+' . preg_replace('/[-+~*()><@"]/', ' ', $builder->query) . '*';
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the given search on the engine.
|
||||
*
|
||||
* @param \Modules\Support\Search\Builder $builder
|
||||
* @param int $perPage
|
||||
* @param int $page
|
||||
* @return mixed
|
||||
*/
|
||||
public function paginate(Builder $builder, $perPage, $page)
|
||||
{
|
||||
$builder->limit = $perPage;
|
||||
$builder->offset = ($perPage * $page) - $perPage;
|
||||
|
||||
return $this->search($builder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Map the given results to instances of the given model.
|
||||
*
|
||||
* @param Laravel\Scout\Builder $builder
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function map(Builder $builder, $results, $model)
|
||||
{
|
||||
return $results['results'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Map the given results to instances of the given model via a lazy collection.
|
||||
*
|
||||
* @param \Laravel\Scout\Builder $builder
|
||||
* @param mixed $results
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @return \Illuminate\Support\LazyCollection
|
||||
*/
|
||||
public function lazyMap(Builder $builder, $results, $model)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the total count from a raw result returned by the engine.
|
||||
*
|
||||
* @param mixed $results
|
||||
* @return int
|
||||
*/
|
||||
public function getTotalCount($results)
|
||||
{
|
||||
return $results['count'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush all of the model's records from the engine.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @return void
|
||||
*/
|
||||
public function flush($model)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a search index.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $options
|
||||
* @return mixed
|
||||
*/
|
||||
public function createIndex($name, array $options = [])
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a search index.
|
||||
*
|
||||
* @param string $name
|
||||
* @return mixed
|
||||
*/
|
||||
public function deleteIndex($name)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
26
Modules/Support/Search/Searchable.php
Normal file
26
Modules/Support/Search/Searchable.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Search;
|
||||
|
||||
use Laravel\Scout\Searchable as ScoutSearchable;
|
||||
|
||||
trait Searchable
|
||||
{
|
||||
use ScoutSearchable {
|
||||
ScoutSearchable::search as scoutSearch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a search against the model's indexed data.
|
||||
*
|
||||
* @param string $query
|
||||
* @param Closure $callback
|
||||
* @return \Modules\Support\Search\Builder
|
||||
*/
|
||||
public function search($query, $callback = null)
|
||||
{
|
||||
$scoutBuilder = $this->scoutSearch($query, $callback);
|
||||
|
||||
return new Builder($this, $scoutBuilder);
|
||||
}
|
||||
}
|
||||
44
Modules/Support/State.php
Normal file
44
Modules/Support/State.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support;
|
||||
|
||||
class State
|
||||
{
|
||||
/**
|
||||
* Path of the resource.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const RESOURCE_PATH = __DIR__ . '/Resources/states';
|
||||
|
||||
/**
|
||||
* Array of states.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $states;
|
||||
|
||||
/**
|
||||
* Get all states of the given country code.
|
||||
*
|
||||
* @param string $code
|
||||
* @return array|null
|
||||
*/
|
||||
public static function get($code)
|
||||
{
|
||||
if (isset(self::$states[$code])) {
|
||||
return self::$states[$code];
|
||||
}
|
||||
|
||||
$path = self::RESOURCE_PATH . "/{$code}.php";
|
||||
|
||||
if (file_exists($path)) {
|
||||
return self::$states[$code] = require $path;
|
||||
}
|
||||
}
|
||||
|
||||
public static function name($countryCode, $stateCode)
|
||||
{
|
||||
return array_get(self::get($countryCode), $stateCode);
|
||||
}
|
||||
}
|
||||
31
Modules/Support/TimeZone.php
Normal file
31
Modules/Support/TimeZone.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support;
|
||||
|
||||
use DateTimeZone;
|
||||
|
||||
class TimeZone
|
||||
{
|
||||
/**
|
||||
* Array of all time zones.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $timeZones;
|
||||
|
||||
/**
|
||||
* Get all defined time zones.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function all()
|
||||
{
|
||||
if (! is_null(self::$timeZones)) {
|
||||
return self::$timeZones;
|
||||
}
|
||||
|
||||
$timeZones = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
|
||||
|
||||
return self::$timeZones = array_combine($timeZones, $timeZones);
|
||||
}
|
||||
}
|
||||
38
Modules/Support/Traits/AddsAsset.php
Normal file
38
Modules/Support/Traits/AddsAsset.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Traits;
|
||||
|
||||
use Modules\Core\Events\CollectingAssets;
|
||||
|
||||
trait AddsAsset
|
||||
{
|
||||
/**
|
||||
* Add assets for admin panel.
|
||||
*
|
||||
* @param array|string $routes
|
||||
* @param array $assets
|
||||
* @return void
|
||||
*/
|
||||
public function addAdminAssets($routes, array $assets)
|
||||
{
|
||||
if (config('app.installed') && $this->app['inAdminPanel']) {
|
||||
$this->addAssets($routes, $assets);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add given assets to the given routes response.
|
||||
*
|
||||
* @param array|string $routes
|
||||
* @param array $assets
|
||||
* @return void
|
||||
*/
|
||||
public function addAssets($routes, array $assets)
|
||||
{
|
||||
$this->app['events']->listen(CollectingAssets::class, function (CollectingAssets $event) use ($routes, $assets) {
|
||||
if ($event->onRoutes(array_wrap($routes))) {
|
||||
$event->requireAssets($assets);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
31
Modules/Support/composer.json
Normal file
31
Modules/Support/composer.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "fleetcart/support",
|
||||
"description": "The FleetCart Support Module.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Envay Soft",
|
||||
"email": "envaysoft@gmail.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.0.2",
|
||||
"spatie/once": "^2.1",
|
||||
"spatie/schema-org": "^3.0",
|
||||
"spatie/laravel-honeypot": "^4.3.2",
|
||||
"bonecms/laravel-captcha": "^2.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Modules\\Support\\": ""
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
283
Modules/Support/helpers.php
Normal file
283
Modules/Support/helpers.php
Normal file
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
|
||||
use FleetCart\FleetCart;
|
||||
use Modules\Support\RTLDetector;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Cookie;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
if (! function_exists('str_between')) {
|
||||
/**
|
||||
* Get the portion of a string between the given values.
|
||||
*
|
||||
* @param string $subject
|
||||
* @param string $search
|
||||
* @return string
|
||||
*/
|
||||
function str_between($subject, $startsWith, $endsWith)
|
||||
{
|
||||
return str_after(str_before($subject, $endsWith), $startsWith);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('locale')) {
|
||||
/**
|
||||
* Get current locale.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function locale()
|
||||
{
|
||||
return app()->getLocale();
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('is_rtl')) {
|
||||
/**
|
||||
* Determine if the given / current locale is RTL script.
|
||||
*
|
||||
* @param string|null $locale
|
||||
* @return bool
|
||||
*/
|
||||
function is_rtl($locale = null)
|
||||
{
|
||||
return RTLDetector::detect($locale ?: locale());
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('currency')) {
|
||||
/**
|
||||
* Get current currency.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function currency()
|
||||
{
|
||||
if (app('inAdminPanel')) {
|
||||
return setting('default_currency');
|
||||
}
|
||||
|
||||
$currency = Cookie::get('currency');
|
||||
|
||||
if (! in_array($currency, setting('supported_currencies'))) {
|
||||
$currency = setting('default_currency');
|
||||
}
|
||||
|
||||
return $currency;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('supported_locales')) {
|
||||
/**
|
||||
* Get all supported locales.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function supported_locales()
|
||||
{
|
||||
return LaravelLocalization::getSupportedLocales();
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('supported_locale_keys')) {
|
||||
/**
|
||||
* Get all supported locale keys.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function supported_locale_keys()
|
||||
{
|
||||
return LaravelLocalization::getSupportedLanguagesKeys();
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('localized_url')) {
|
||||
/**
|
||||
* Returns an URL adapted to the given locale.
|
||||
*
|
||||
* @param string $locale
|
||||
* @param string $url
|
||||
* @return string
|
||||
*/
|
||||
function localized_url($locale, $url = null)
|
||||
{
|
||||
return LaravelLocalization::getLocalizedURL($locale, $url);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('non_localized_url')) {
|
||||
/**
|
||||
* It returns an URL without locale.
|
||||
*
|
||||
* @param string $url
|
||||
* @return string
|
||||
*/
|
||||
function non_localized_url($url = null)
|
||||
{
|
||||
return LaravelLocalization::getNonLocalizedURL($url);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('is_multilingual')) {
|
||||
/**
|
||||
* Determine if the app has multi language.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_multilingual()
|
||||
{
|
||||
return count(supported_locales()) > 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('is_multi_currency')) {
|
||||
/**
|
||||
* Determine if the app has multi currency.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_multi_currency()
|
||||
{
|
||||
return count(setting('supported_currencies')) > 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('is_module_enabled')) {
|
||||
/**
|
||||
* Determine if the given module is enabled.
|
||||
*
|
||||
* @param string $module
|
||||
* @return bool
|
||||
*/
|
||||
function is_module_enabled($module)
|
||||
{
|
||||
return array_key_exists($module, app('modules')->allEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('is_core_module')) {
|
||||
/**
|
||||
* Determine if the given module is core module.
|
||||
*
|
||||
* @param string $module
|
||||
* @return bool
|
||||
*/
|
||||
function is_core_module($module)
|
||||
{
|
||||
return in_array(strtolower($module), config('fleetcart.modules.core.config.core_modules'));
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('slugify')) {
|
||||
/**
|
||||
* Generate a URL friendly "slug" from a given string
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
function slugify($value)
|
||||
{
|
||||
$slug = preg_replace('/[\s<>[\]{}|\\^%&\$,\/:;=?@#\'\"]/', '-', mb_strtolower($value));
|
||||
|
||||
// Remove duplicate separators.
|
||||
$slug = preg_replace('/-+/', '-', $slug);
|
||||
|
||||
// Trim special characters from the beginning and end of the slug.
|
||||
return trim($slug, '!"#$%&\'()*+,-./:;<=>?@[]^_`{|}~');
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('v')) {
|
||||
/**
|
||||
* Version a relative asset using the time its contents last changed.
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
function v($path)
|
||||
{
|
||||
if (config('app.env') === 'local') {
|
||||
$version = uniqid();
|
||||
} else {
|
||||
$version = FleetCart::VERSION;
|
||||
}
|
||||
|
||||
return "{$path}?v=" . $version;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('fleetcart_version')) {
|
||||
/**
|
||||
* Get the fleetcart version.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function fleetcart_version()
|
||||
{
|
||||
return FleetCart::VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('old_json')) {
|
||||
/**
|
||||
* Retrieve and json encode an old input item.
|
||||
*
|
||||
* @param string $array
|
||||
* @param mixed $default
|
||||
* @param mixed $options
|
||||
* @return string
|
||||
*/
|
||||
function old_json($key, $default = [], $options = null)
|
||||
{
|
||||
$old = array_reset_index(old($key, []));
|
||||
|
||||
return json_encode($old ?: $default, $options);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('array_reset_index')) {
|
||||
/**
|
||||
* Reset numeric index of an array recursively.
|
||||
*
|
||||
* @param array $array
|
||||
* @return array|\Illuminate\Support\Collection
|
||||
*
|
||||
* @see https://stackoverflow.com/a/12399408/5736257
|
||||
*/
|
||||
function array_reset_index($array)
|
||||
{
|
||||
$array = $array instanceof Collection
|
||||
? $array->toArray()
|
||||
: $array;
|
||||
|
||||
foreach ($array as $key => $val) {
|
||||
if (is_array($val)) {
|
||||
$array[$key] = array_reset_index($val);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($key) && is_numeric($key)) {
|
||||
return array_values($array);
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('html_attrs')) {
|
||||
/**
|
||||
* Convert array to html attributes.
|
||||
*
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
*/
|
||||
function html_attrs(array $attributes)
|
||||
{
|
||||
$string = '';
|
||||
|
||||
foreach ($attributes as $name => $value) {
|
||||
$string .= " {$name}={$value}";
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
13
Modules/Support/module.json
Normal file
13
Modules/Support/module.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "Support",
|
||||
"alias": "support",
|
||||
"description": "The FleetCart Support Module.",
|
||||
"priority": 120,
|
||||
"providers": [
|
||||
"Modules\\Support\\Providers\\MySQLScoutServiceProvider",
|
||||
"Modules\\Support\\Providers\\EloquentMacroServiceProvider"
|
||||
],
|
||||
"files": [
|
||||
"helpers.php"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user