1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-23 22:32:54 +00:00

Updated phone formatter (#241)

* Add locale and libphonenumber libraries.

* Update country code information

Updated existing country codes, fixed incorrect NANP codes for member countries (as well as several UK based ones).

Also added in Country Name to ISO country code mapping array for use with libphonenumber.

* Convert phone number formatting to use libphonenumber

libphonenumber parses phone number more consistantly than the old regex's that mismatched number on a regular basis.
This commit is contained in:
Greg Ross
2018-06-26 03:49:22 -04:00
committed by Loïc Blot
parent d29e2b1f7f
commit 6e86c48486
1371 changed files with 636043 additions and 284 deletions
+237
View File
@@ -0,0 +1,237 @@
<?php
/**
* This file has been @generated by a phing task from CLDR version 33.0.0.
* See [README.md](README.md#generating-data) for more information.
*
* @internal Please do not require this file directly.
* It may change location/format between versions
*
* Do not modify this file directly!
*/
return array (
'AD' => 'Andorra',
'AE' => 'Emirà Arabo mitambatra',
'AF' => 'Afghanistan',
'AG' => 'Antiga sy Barboda',
'AI' => 'Anguilla',
'AL' => 'Albania',
'AM' => 'Armenia',
'AO' => 'Angola',
'AR' => 'Arzantina',
'AS' => 'Samoa amerikanina',
'AT' => 'Aotrisy',
'AU' => 'Aostralia',
'AW' => 'Arobà',
'AZ' => 'Azerbaidjan',
'BA' => 'Bosnia sy Herzegovina',
'BB' => 'Barbady',
'BD' => 'Bangladesy',
'BE' => 'Belzika',
'BF' => 'Borkina Faso',
'BG' => 'Biolgaria',
'BH' => 'Bahrain',
'BI' => 'Borondi',
'BJ' => 'Benin',
'BM' => 'Bermioda',
'BN' => 'Brunei',
'BO' => 'Bolivia',
'BR' => 'Brezila',
'BS' => 'Bahamas',
'BT' => 'Bhotana',
'BW' => 'Botsoana',
'BY' => 'Belarosy',
'BZ' => 'Belize',
'CA' => 'Kanada',
'CD' => 'Repoblikani Kongo',
'CF' => 'Repoblika IvonAfrika',
'CG' => 'Kôngô',
'CH' => 'Soisa',
'CI' => 'Côte dIvoire',
'CK' => 'Nosy Kook',
'CL' => 'Shili',
'CM' => 'Kamerona',
'CN' => 'Sina',
'CO' => 'Kôlômbia',
'CR' => 'Kosta Rikà',
'CU' => 'Kiobà',
'CV' => 'Nosy Cap-Vert',
'CY' => 'Sypra',
'CZ' => 'Repoblikani Tseky',
'DE' => 'Alemaina',
'DJ' => 'Djiboti',
'DK' => 'Danmarka',
'DM' => 'Dominika',
'DO' => 'Repoblika Dominikanina',
'DZ' => 'Alzeria',
'EC' => 'Ekoatera',
'EE' => 'Estonia',
'EG' => 'Ejypta',
'ER' => 'Eritrea',
'ES' => 'Espaina',
'ET' => 'Ethiopia',
'FI' => 'Finlandy',
'FJ' => 'Fidji',
'FK' => 'Nosy Falkand',
'FM' => 'Mikrônezia',
'FR' => 'Frantsa',
'GA' => 'Gabon',
'GB' => 'Angletera',
'GD' => 'Grenady',
'GE' => 'Zeorzia',
'GF' => 'Guyana frantsay',
'GH' => 'Ghana',
'GI' => 'Zibraltara',
'GL' => 'Groenland',
'GM' => 'Gambia',
'GN' => 'Ginea',
'GP' => 'Goadelopy',
'GQ' => 'Guinea Ekoatera',
'GR' => 'Gresy',
'GT' => 'Goatemalà',
'GU' => 'Guam',
'GW' => 'Giné-Bisao',
'GY' => 'Guyana',
'HN' => 'Hondiorasy',
'HR' => 'Kroasia',
'HT' => 'Haiti',
'HU' => 'Hongria',
'ID' => 'Indonezia',
'IE' => 'Irlandy',
'IL' => 'Israely',
'IN' => 'Indy',
'IO' => 'Faridranomasina indiana britanika',
'IQ' => 'Irak',
'IR' => 'Iran',
'IS' => 'Islandy',
'IT' => 'Italia',
'JM' => 'Jamaïka',
'JO' => 'Jordania',
'JP' => 'Japana',
'KE' => 'Kenya',
'KG' => 'Kiordistan',
'KH' => 'Kambôdja',
'KI' => 'Kiribati',
'KM' => 'Kômaoro',
'KN' => 'Saint-Christophe-et-Niévès',
'KP' => 'Korea Avaratra',
'KR' => 'Korea Atsimo',
'KW' => 'Kôeity',
'KY' => 'Nosy Kayman',
'KZ' => 'Kazakhstan',
'LA' => 'Laôs',
'LB' => 'Libana',
'LC' => 'Sainte-Lucie',
'LI' => 'Listenstein',
'LK' => 'Sri Lanka',
'LR' => 'Liberia',
'LS' => 'Lesotho',
'LT' => 'Litoania',
'LU' => 'Lioksamboro',
'LV' => 'Letonia',
'LY' => 'Libya',
'MA' => 'Marôka',
'MC' => 'Mônakô',
'MD' => 'Môldavia',
'MG' => 'Madagasikara',
'MH' => 'Nosy Marshall',
'MK' => 'Makedonia',
'ML' => 'Mali',
'MM' => 'Myanmar',
'MN' => 'Môngôlia',
'MP' => 'Nosy Mariana Atsinanana',
'MQ' => 'Martinika',
'MR' => 'Maoritania',
'MS' => 'Montserrat',
'MT' => 'Malta',
'MU' => 'Maorisy',
'MV' => 'Maldiva',
'MW' => 'Malaoì',
'MX' => 'Meksika',
'MY' => 'Malaizia',
'MZ' => 'Mozambika',
'NA' => 'Namibia',
'NC' => 'Nouvelle-Calédonie',
'NE' => 'Niger',
'NF' => 'Nosy Norfolk',
'NG' => 'Nizeria',
'NI' => 'Nikaragoà',
'NL' => 'Holanda',
'NO' => 'Nôrvezy',
'NP' => 'Nepala',
'NR' => 'Naorò',
'NU' => 'Nioé',
'NZ' => 'Nouvelle-Zélande',
'OM' => 'Oman',
'PA' => 'Panama',
'PE' => 'Peroa',
'PF' => 'Polynezia frantsay',
'PG' => 'Papouasie-Nouvelle-Guinée',
'PH' => 'Filipina',
'PK' => 'Pakistan',
'PL' => 'Pôlôna',
'PM' => 'Saint-Pierre-et-Miquelon',
'PN' => 'Pitkairn',
'PR' => 'Pôrtô Rikô',
'PS' => 'Palestina',
'PT' => 'Pôrtiogala',
'PW' => 'Palao',
'PY' => 'Paragoay',
'QA' => 'Katar',
'RE' => 'Larenion',
'RO' => 'Romania',
'RU' => 'Rosia',
'RW' => 'Roanda',
'SA' => 'Arabia saodita',
'SB' => 'Nosy Salomona',
'SC' => 'Seyshela',
'SD' => 'Sodan',
'SE' => 'Soedy',
'SG' => 'Singaporo',
'SH' => 'Sainte-Hélène',
'SI' => 'Slovenia',
'SK' => 'Slovakia',
'SL' => 'Sierra Leone',
'SM' => 'Saint-Marin',
'SN' => 'Senegal',
'SO' => 'Somalia',
'SR' => 'Sorinam',
'ST' => 'São Tomé-et-Príncipe',
'SV' => 'El Salvador',
'SY' => 'Syria',
'SZ' => 'Soazilandy',
'TC' => 'Nosy Turks sy Caïques',
'TD' => 'Tsady',
'TG' => 'Togo',
'TH' => 'Thailandy',
'TJ' => 'Tajikistan',
'TK' => 'Tokelao',
'TL' => 'Timor Atsinanana',
'TM' => 'Torkmenistan',
'TN' => 'Tonizia',
'TO' => 'Tongà',
'TR' => 'Torkia',
'TT' => 'Trinidad sy Tobagô',
'TV' => 'Tovalò',
'TW' => 'Taioana',
'TZ' => 'Tanzania',
'UA' => 'Okraina',
'UG' => 'Oganda',
'US' => 'Etazonia',
'UY' => 'Orogoay',
'UZ' => 'Ozbekistan',
'VA' => 'Fireneni Vatikana',
'VC' => 'Saint-Vincent-et-les Grenadines',
'VE' => 'Venezoelà',
'VG' => 'Nosy britanika virijiny',
'VI' => 'Nosy Virijiny Etazonia',
'VN' => 'Vietnam',
'VU' => 'Vanoatò',
'WF' => 'Wallis sy Futuna',
'WS' => 'Samoa',
'YE' => 'Yemen',
'YT' => 'Mayôty',
'ZA' => 'Afrika Atsimo',
'ZM' => 'Zambia',
'ZW' => 'Zimbaboe',
);