How can I output the territories array with craft.i18n? I found this code in the Craft documentation:


{% set localeData = craft.i18n.getLocaleData() %}
{% for month in localeData.getMonthNames() %}
    {{ month }}
{% endfor %}


What I need is the whole list of countries (from Ascension Island to Zimbabwe).
I tried .getTerritories() but it doesn't exist:


{% set localeData = craft.i18n.getLocaleData() %}
{% for country in localeData.getTerritories() %}
    {{ country }}
{% endfor %}


Is there any solution?
Looks like Yii doesn't expose a way to grab all of the territories for a given locale by default.

I've just added it to Craft 2.2, though.  So when that comes out, you'll be able to do this:

$localeData = craft()-&gt;i18n-&gt;getLocaleData('en_us');
$allTerritories = $localeData-&gt;getAllTerritories();