-
-
Save tleen/6395808 to your computer and use it in GitHub Desktop.
['Alberta', 'British Columbia', 'Manitoba', 'New Brunswick', 'Newfoundland and Labrador', 'Northwest Territories', 'Nova Scotia', 'Nunavut', 'Ontario', 'Prince Edward Island', 'Quebec', 'Saskatchewan', 'Yukon Territory'] |
One more version, for those who may need it one day...
var CanadianProvinces = ['AB', 'BC', 'MB', 'NB', 'NL', 'NT', 'NS', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT'];
[ { name: 'Alberta', abbreviation: 'AB' }, { name: 'British Columbia', abbreviation: 'BC' }, { name: 'Manitoba', abbreviation: 'MB' }, { name: 'New Brunswick', abbreviation: 'NB' }, { name: 'Newfoundland and Labrador', abbreviation: 'NL' }, { name: 'Northwest Territories', abbreviation: 'NT' }, { name: 'Nova Scotia', abbreviation: 'NS' }, { name: 'Nunavut', abbreviation: 'NU' }, { name: 'Ontario', abbreviation: 'ON' }, { name: 'Prince Edward Island', abbreviation: 'PE' }, { name: 'Quebec', abbreviation: 'QC' }, { name: 'Saskatchewan', abbreviation: 'SK' }, { name: 'Yukon Territory', abbreviation: 'YT' } ]
{
"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"
}
Android Arrays XML file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="provinces_key">
<item>AB</item>
<item>BC</item>
<item>MB</item>
<item>NB</item>
<item>NL</item>
<item>NT</item>
<item>NS</item>
<item>NU</item>
<item>ON</item>
<item>PE</item>
<item>QC</item>
<item>SK</item>
<item>YT</item>
</array>
<array name="provinces_name">
<item>Alberta</item>
<item>British Columbia</item>
<item>Manitoba</item>
<item>New Brunswick</item>
<item>Newfoundland & Labrador</item>
<item>Northwest Territories</item>
<item>Nova Scotia</item>
<item>Nunavut</item>
<item>Ontario</item>
<item>Prince Edward Island</item>
<item>Quebec</item>
<item>Saskatchewan</item>
<item>Yukon Territories</item>
</array>
</resources>
Thank you :)