I'm wondering if there's a build in craft function for displaying countries (countryCode and/or name)?
Just like it is for displaying locales:
craft.i18n.getAllLocales()
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityI'm wondering if there's a build in craft function for displaying countries (countryCode and/or name)?
Just like it is for displaying locales:
craft.i18n.getAllLocales()
The closest thing I can think of is to pull the data from the 'territories' part of a craft/app/framework/i18n/data
file.
For 'en_us', that would be something like this:
{% set localeData = craft.i18n.getLocaleData('en_us') %}
{% set allTerritories = localeData.getAllTerritories() %}