107 lines
2.2 KiB
PHP
107 lines
2.2 KiB
PHP
<?php // phpcs:ignore - @generation-checksum CA-13-1079
|
|
/**
|
|
* Country Class for Canada (CA).
|
|
*
|
|
* State/province count: 13
|
|
* City count: 1079
|
|
* City count per state/province:
|
|
* - QC: 351 cities
|
|
* - ON: 239 cities
|
|
* - BC: 139 cities
|
|
* - AB: 115 cities
|
|
* - SK: 54 cities
|
|
* - MB: 43 cities
|
|
* - NS: 43 cities
|
|
* - NB: 37 cities
|
|
* - NL: 32 cities
|
|
* - PE: 9 cities
|
|
* - NT: 7 cities
|
|
* - NU: 6 cities
|
|
* - YT: 4 cities
|
|
*
|
|
* @package WP_Ultimo\Country
|
|
* @since 2.0.11
|
|
*/
|
|
|
|
namespace WP_Ultimo\Country;
|
|
|
|
// Exit if accessed directly
|
|
defined('ABSPATH') || exit;
|
|
|
|
/**
|
|
* Country Class for Canada (CA).
|
|
*
|
|
* IMPORTANT:
|
|
* This file is generated by build scripts, do not
|
|
* change it directly or your changes will be LOST!
|
|
*
|
|
* @since 2.0.11
|
|
*
|
|
* @property-read string $code
|
|
* @property-read string $currency
|
|
* @property-read int $phone_code
|
|
*/
|
|
class Country_CA extends Country {
|
|
|
|
use \WP_Ultimo\Traits\Singleton;
|
|
|
|
/**
|
|
* General country attributes.
|
|
*
|
|
* This might be useful, might be not.
|
|
* In case of doubt, keep it.
|
|
*
|
|
* @since 2.0.11
|
|
* @var array
|
|
*/
|
|
protected $attributes = [
|
|
'country_code' => 'CA',
|
|
'currency' => 'CAD',
|
|
'phone_code' => 1,
|
|
];
|
|
|
|
/**
|
|
* The type of nomenclature used to refer to the country sub-divisions.
|
|
*
|
|
* @since 2.0.11
|
|
* @var string
|
|
*/
|
|
protected $state_type = 'province';
|
|
|
|
/**
|
|
* Return the country name.
|
|
*
|
|
* @since 2.0.11
|
|
* @return string
|
|
*/
|
|
public function get_name() {
|
|
|
|
return __('Canada', 'wp-ultimo');
|
|
}
|
|
|
|
/**
|
|
* Returns the list of states for CA.
|
|
*
|
|
* @since 2.0.11
|
|
* @return array The list of state/provinces for the country.
|
|
*/
|
|
protected function states() {
|
|
|
|
return [
|
|
'AB' => __('Alberta', 'wp-ultimo'),
|
|
'BC' => __('British Columbia', 'wp-ultimo'),
|
|
'MB' => __('Manitoba', 'wp-ultimo'),
|
|
'NB' => __('New Brunswick', 'wp-ultimo'),
|
|
'NL' => __('Newfoundland and Labrador', 'wp-ultimo'),
|
|
'NT' => __('Northwest Territories', 'wp-ultimo'),
|
|
'NS' => __('Nova Scotia', 'wp-ultimo'),
|
|
'NU' => __('Nunavut', 'wp-ultimo'),
|
|
'ON' => __('Ontario', 'wp-ultimo'),
|
|
'PE' => __('Prince Edward Island', 'wp-ultimo'),
|
|
'QC' => __('Quebec', 'wp-ultimo'),
|
|
'SK' => __('Saskatchewan', 'wp-ultimo'),
|
|
'YT' => __('Yukon', 'wp-ultimo'),
|
|
];
|
|
}
|
|
}
|