<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>

CC BY-SA 3.0
2016-08-26T07:57:14.527Z
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 ?
nickGR
CC BY-SA 3.0
2016-08-26T19:22:49.013Z
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
Brad Bell
CC BY-SA 3.0
2016-08-25T17:26:58.673Z
2016-08-25T17:26:58.673Z
Brad Bell
<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>

CC BY-SA 3.0
2016-08-25T15:53:13.073Z
Could you elaborate on your use case?
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2016-08-25T15:56:11.740Z
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?
nickGR
CC BY-SA 3.0
2016-08-25T16:21:59.210Z
Ok, have you read [the official docs on the subject](https://craftcms.com/docs/localization-guide#step-4-define-your-site-uRLs)?
Mats Mikkel Rummelhoff
<localization>
Use en-US instead of en_us locale code
# 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 your 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  

---

