Answers.Body: <p>The countries in CiviCRM are based on ISO 3166, and the state / province list per country is based on ISO 3166-2. Not all countries have these defined, and we may need to grab a more up to date copy. Can you check against <a href="http://www.unece.org/cefact/locode/subdivisions.html" rel="nofollow">http://www.unece.org/cefact/locode/subdivisions.html</a> and comment if that is sufficient? Alternatively, you can update the list in your instance of CiviCRM using a tool like phpMyAdmin to include unofficial states and provinces of countries by adding records to the civicrm_state_province table.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T18:49:49.967Z
Answers.Text: Thank you, this is very helpful.  I am working with an organization that is related to the UN, so this list will be very valuable.  We will let you know if anything continues to be missing.  Perhaps we can get UNECE to update their list, if appropriate.  Appreciate your help.  Thank you.
Answers.UserDisplayName: Nina Gonzalez
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-19T17:18:52.850Z
Answers.LastActivityDate: 2016-04-19T17:18:52.850Z
Answers.UserDisplayName: Joe Murray
Answers.Body: <p>There is no specialized mechanism for updating the state/province values in the database. You can file an issue in JIRA (<a href="https://issues.civicrm.org/" rel="nofollow">https://issues.civicrm.org/</a>) and provide the details there, and someome from the team can add the appropriate changes for the next release.</p>
  
  <p>You could also apply the changes at Github and then request a pull. The <code>civicrm_state_province</code> table is populated during installation via <a href="https://github.com/civicrm/civicrm-core/blob/master/xml/templates/civicrm_state_province.tpl" rel="nofollow">https://github.com/civicrm/civicrm-core/blob/master/xml/templates/civicrm_state_province.tpl</a> . You can find country IDs in the <a href="https://github.com/civicrm/civicrm-core/blob/master/xml/templates/civicrm_country.tpl" rel="nofollow">country ID template</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-13T00:04:55.597Z
Answers.Text: @JonG Thanks for the edit, but I think you missed my point. Do the IDs represent anything in real life— an ISO identifier, say— or are they arbitrary and specific only to CiviCRM? That makes a difference when rolling a patch or making corrections in your local installation that may vary from any future values.
Answers.UserDisplayName: choster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-13T00:22:48.923Z
Answers.Text: Ah, sorry choster, and feel free to revert my edit!  I'll confirm that these aren't ISO codes; everything is CiviCRM-specific.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-12T22:27:48.030Z
Answers.LastActivityDate: 2016-04-13T00:01:15.690Z
Answers.LastEditDate: 2016-04-13T00:01:15.690Z
Answers.UserDisplayName: choster
Body: <p>Hello we are moving an old CRM into CiviCRM.  We are a very international organization and we have found that CiviCRM is missing many states.  How do we get this added to CiviCRM?  Should we make these additions to our instance, or can we get this added to the standard CiviCRM state table?</p>
  
  <ol start="17">
  <li><p>Gabon: No States. </p></li>
  <li><p>Ghana: Some States are missing.</p></li>
  <li><p>Gibraltar: No States.</p></li>
  <li><p>Greece: Syros is missing.</p></li>
  <li><p>Greenland: No States.</p></li>
  <li><p>Guadeloupe: No States.</p></li>
  <li><p>India: Telangana is missing.</p></li>
  <li><p>Macedonia, Republic of: No States.</p></li>
  <li><p>Malta: Some States are missing.</p></li>
  <li><p>Mexico: Michoacan is spelled wrong.</p></li>
  <li><p>Moldova: States are missing.</p></li>
  <li><p>Montenegro: States are missing</p></li>
  <li><p>Nepal: No States.</p></li>
  <li><p>Paraguay: Central is missing.</p></li>
  <li><p>Portugal: Coimbra is spelled wrong.</p></li>
  <li><p>Serbia: States are missing.</p></li>
  <li><p>Seychelles: States are missing.</p></li>
  <li><p>Singapore: States are missing. </p></li>
  <li><p>Sweden: Halsingland is missing.</p></li>
  </ol>
  
  <p>36.Tajikistan: Karotegin is missing.</p>
  
  <ol start="37">
  <li><p>Thailand: Bueng Kan is missing.</p></li>
  <li><p>Togo: Plateaux is missing.</p></li>
  <li><p>Venezuela: Bolivar is missing.</p></li>
  <li><p>Yugoslavia: it doesn’t exist, move states to new respective countries. </p></li>
  <li><p>Zambia Some States are missing. </p></li>
  </ol>
  
Tags: <database>
Title: Adding states to countries
ThreadText: # Adding states to countries
  
  (Asked by: username_0 on 2016-04-12)
  
  Hello we are moving an old CRM into CiviCRM. We are a very international organization and we have found that CiviCRM is missing many states. How do we get this added to CiviCRM? Should we make these additions to our instance, or can we get this added to the standard CiviCRM state table?
  
  17. Gabon: No States.
  18. Ghana: Some States are missing.
  19. Gibraltar: No States.
  20. Greece: Syros is missing.
  21. Greenland: No States.
  22. Guadeloupe: No States.
  23. India: Telangana is missing.
  24. Macedonia, Republic of: No States.
  25. Malta: Some States are missing.
  26. Mexico: Michoacan is spelled wrong.
  27. Moldova: States are missing.
  28. Montenegro: States are missing
  29. Nepal: No States.
  30. Paraguay: Central is missing.
  31. Portugal: Coimbra is spelled wrong.
  32. Serbia: States are missing.
  33. Seychelles: States are missing.
  34. Singapore: States are missing.
  35. Sweden: Halsingland is missing.
  
  36.Tajikistan: Karotegin is missing.
  
  37. Thailand: Bueng Kan is missing.
  38. Togo: Plateaux is missing.
  39. Venezuela: Bolivar is missing.
  40. Yugoslavia: it doesn’t exist, move states to new respective countries.
  41. Zambia Some States are missing.
  
  **Tags:** database
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-04-19. Score: 2 | Accepted answer
  
  The countries in CiviCRM are based on ISO 3166, and the state / province list per country is based on ISO 3166-2. Not all countries have these defined, and we may need to grab a more up to date copy. Can you check against <http://www.unece.org/cefact/locode/subdivisions.html> and comment if that is sufficient? Alternatively, you can update the list in your instance of CiviCRM using a tool like phpMyAdmin to include unofficial states and provinces of countries by adding records to the civicrm\_state\_province table.
  
  > **Comments:**
  > **username_0**: Thank you, this is very helpful.  I am working with an organization that is related to the UN, so this list will be very valuable.  We will let you know if anything continues to be missing.  Perhaps we can get UNECE to update their list, if appropriate.  Appreciate your help.  Thank you.  
  
  ---
  
  ### Answer by username_2 on 2016-04-12. Score: 4
  
  There is no specialized mechanism for updating the state/province values in the database. You can file an issue in JIRA (<https://issues.civicrm.org/>) and provide the details there, and someome from the team can add the appropriate changes for the next release.
  
  You could also apply the changes at Github and then request a pull. The `civicrm_state_province` table is populated during installation via <https://github.com/civicrm/civicrm-core/blob/master/xml/templates/civicrm_state_province.tpl> . You can find country IDs in the [country ID template](https://github.com/civicrm/civicrm-core/blob/master/xml/templates/civicrm_country.tpl).
  
  > **Comments:**
  > **username_2**: @JonG Thanks for the edit, but I think you missed my point. Do the IDs represent anything in real life— an ISO identifier, say— or are they arbitrary and specific only to CiviCRM? That makes a difference when rolling a patch or making corrections in your local installation that may vary from any future values.  
  > **username_3**: Ah, sorry username_2, and feel free to revert my edit!  I'll confirm that these aren't ISO codes; everything is CiviCRM-specific.  
  
  ---
  
  