Answers.Body: <p>The closest thing I can think of is to pull the data from the 'territories' part of a <code>craft/app/framework/i18n/data</code> file.</p>
  
  <p>For 'en_us', that would be something like this:</p>
  
  <pre><code>{% set localeData = craft.i18n.getLocaleData('en_us') %}
  {% set allTerritories = localeData.getAllTerritories() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-16T14:08:46.133Z
Answers.Text: How do I know which variable names to use for the "allTerritories" variable from localData.getAllTerritories? A twig {{ dump() }} didn't work. Thanks.
Answers.UserDisplayName: naboovalley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-16T16:18:13.747Z
Answers.Text: Disrecard my last comment. Turning on devMode made the "dump" function available.
Answers.UserDisplayName: naboovalley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-15T23:03:40.043Z
Answers.LastActivityDate: 2014-10-15T23:03:40.043Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm wondering if there's a build in craft function for displaying countries (countryCode and/or name)?</p>
  
  <p>Just like it is for displaying locales:</p>
  
  <pre><code>craft.i18n.getAllLocales()
  </code></pre>
  
Tags: <localization>
Title: Does craft have any build in function for countries like locales?
ThreadText: # Does craft have any build in function for countries like locales?
  
  (Asked by: username_0 on 2014-10-15)
  
  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()
  
  ```
  
  **Tags:** localization
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-10-15. Score: 1
  
  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() %}
  
  ```
  
  > **Comments:**
  > **username_0**: How do I know which variable names to use for the "allTerritories" variable from localData.getAllTerritories? A twig {{ dump() }} didn't work. Thanks.  
  > **username_0**: Disrecard my last comment. Turning on devMode made the "dump" function available.  
  
  ---
  
  