Answers.Body: <p>When <a href="https://craftcms.com/docs/localization-guide#step-4-define-your-site-uRLs" rel="nofollow">defining</a> your <a href="https://craftcms.com/docs/config-settings#siteUrl" rel="nofollow">siteUrl</a>, you can do:</p>
  
  <pre><code>return array(
      // ...
      'siteUrl' =&gt; array(
          'en_us' =&gt; 'http://example.com/en-US/',
          // ...
      ),
  );
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-26T07:57:14.527Z
Answers.Text: Yeah this is what i tried to do.So the Url seems to be accepted, i mean i dont get a 404 but i dont get any content either, just getting an empty page.And also after doing the change at the siteUrl if i hit the Url with en_us i still get the content.Do i need to do any other change on the CMS or something ?
Answers.UserDisplayName: nickGR
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-26T19:22:49.013Z
Answers.Text: Sounds like something else is wrong in your localization setup.  I'd recommend going through the guide step-by-step: https://craftcms.com/docs/localization-guide
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-25T17:26:58.673Z
Answers.LastActivityDate: 2016-08-25T17:26:58.673Z
Answers.UserDisplayName: Brad Bell
Body: <p>I want to use locales like <code>en-US</code> instead of <code>en_us</code>.
  Is there a way to do this other than creating totally new locales?
  Can I set it up at the siteUrl ?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-25T15:53:13.073Z
Comments.Text: Could you elaborate on your use case?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-25T15:56:11.740Z
Comments.Text: I mean than instead of using the en_us code in the Url to get the en_us content i would like to use en-US , like http://www.example.com/en-US/homepage, is that possible?
Comments.UserDisplayName: nickGR
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-25T16:21:59.210Z
Comments.Text: Ok, have you read [the official docs on the subject](https://craftcms.com/docs/localization-guide#step-4-define-your-site-uRLs)?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Tags: <localization>
Title: Use en-US instead of en_us locale code
ThreadText: # Use en-US instead of en_us locale code
  
  (Asked by: username_0 on 2016-08-25)
  
  I want to use locales like `en-US` instead of `en_us`.
  Is there a way to do this other than creating totally new locales?
  Can I set it up at the siteUrl ?
  
  **Tags:** localization
  
  > **Comments:**
  > **username_1**: Could you elaborate on your use case?  
  > **username_0**: I mean than instead of using the en_us code in the Url to get the en_us content i would like to use en-US , like http://www.example.com/en-US/homepage, is that possible?  
  > **username_1**: Ok, have you read [the official docs on the subject](https://craftcms.com/docs/localization-guide#step-4-define-your-site-uRLs)?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-08-25. Score: 2
  
  When [defining](https://craftcms.com/docs/localization-guide#step-4-define-your-site-uRLs) your [siteUrl](https://craftcms.com/docs/config-settings#siteUrl), you can do:
  
  ```
  return array(
      // ...
      'siteUrl' => array(
          'en_us' => 'http://example.com/en-US/',
          // ...
      ),
  );
  
  ```
  
  > **Comments:**
  > **username_0**: Yeah this is what i tried to do.So the Url seems to be accepted, i mean i dont get a 404 but i dont get any content either, just getting an empty page.And also after doing the change at the siteUrl if i hit the Url with en_us i still get the content.Do i need to do any other change on the CMS or something ?  
  > **username_2**: Sounds like something else is wrong in your localization setup.  I'd recommend going through the guide step-by-step: https://craftcms.com/docs/localization-guide  
  
  ---
  
  