<p>If you define your base site URLs using the <a href="http://buildwithcraft.com/docs/config-settings#siteUrl" rel="nofollow">siteUrl config setting</a> (using the array syntax), then clicking the “Share” button should bring you to the appropriate locale’s URL.</p>

CC BY-SA 3.0
2015-10-08T20:26:32.597Z
Thanks Brandon - will repost 2nd Q

My config looks like
`code`    
    'siteUrl' => array(
    'en' => 'http://craftyCMS.dev/en/',
    'ar' => 'http://craftyCMS.dev/ar/',
    'zh' => 'http://craftyCMS.dev/zh',
    );
`code`
Share link never has the locale in it
joomkit
CC BY-SA 3.0
2015-10-08T21:01:22.973Z
And those locale IDs are _exactly_ the same as the locale IDs in Settings > Locales?
Brandon Kelly
CC BY-SA 3.0
2015-10-09T16:22:07.587Z
Yes they are all their. But i think i am being stupid now - are all my routes/urls for a section meant to have the locale in the 'Entry URL Format' list per language. This makes it work [slaps head]
joomkit
CC BY-SA 3.0
2015-10-09T16:58:13.517Z
No, they shouldn't. Can you please send in a support ticket from your Dashboard, so we can take a look at the site and see what's going on?
Brandon Kelly
CC BY-SA 3.0
2015-10-15T15:32:03.617Z
SOLVED: i had a collapsed return array that was empty hiding in my IDE [facepalm] once removed then it all works as expected. Thanks for the support
joomkit
CC BY-SA 3.0
2015-10-08T18:28:55.387Z
2015-10-08T18:28:55.387Z
Brandon Kelly
<p>I have setup 10 languages for a project which are all working fine when accessed directly, eg 'craft.dev/fr/page','craft.dev/zh/page','craft.dev/es/page'.</p>

<p>However when in admin there are two ways of previewing the translated content.
Side by side preview shows the translation fine and uses an admin URI with the locale on the end of the admin url.
But if you external preview the local is not in the URL so throws a 404.</p>

<p>Is this a missing feature or a config issue? I was expecting the locale to appear in the external url</p>

<p><strong>Update</strong></p>

<p>My config looks like</p>

<pre><code>'siteUrl' =&gt; array(
    'en' =&gt; 'http://craftyCMS.dev/en/',
    'ar' =&gt; 'http://craftyCMS.dev/ar/',
    'zh' =&gt; 'http://craftyCMS.dev/zh',
);
</code></pre>

<p>Share link never has the locale in it.</p>

CC BY-SA 3.0
2015-10-08T18:30:00.273Z
Please post your second question in a new Q&A thread, thanks! (You can access what you originally typed [here](http://craftcms.stackexchange.com/posts/11805/revisions).)
Brandon Kelly
<localization><live-preview>
Previewing different languages
# Previewing different languages

(Asked by: username_0 on 2015-10-08)

I have setup 10 languages for a project which are all working fine when accessed directly, eg 'craft.dev/fr/page','craft.dev/zh/page','craft.dev/es/page'.
However when in admin there are two ways of previewing the translated content.
Side by side preview shows the translation fine and uses an admin URI with the locale on the end of the admin url.
But if you external preview the local is not in the URL so throws a 404.
Is this a missing feature or a config issue? I was expecting the locale to appear in the external url
Update
My config looks like
'siteUrl' => array(
    'en' => 'http://craftyCMS.dev/en/',
    'ar' => 'http://craftyCMS.dev/ar/',
    'zh' => 'http://craftyCMS.dev/zh',
);

Share link never has the locale in it.

**Tags:** localization, live-preview
> **Comments:**
> **username_1**: Please post your second question in a new Q&A thread, thanks! (You can access what you originally typed [here](http://craftcms.stackexchange.com/posts/11805/revisions).)  

---

## 1 answers

### Answer by username_1 on 2015-10-08. Score: 2

If you define your base site URLs using the [siteUrl config setting](http://buildwithcraft.com/docs/config-settings#siteUrl) (using the array syntax), then clicking the “Share” button should bring you to the appropriate locale’s URL.

> **Comments:**
> **username_0**: Thanks Brandon - will repost 2nd Q  My config looks like `code`         'siteUrl' => array(     'en' => 'http://craftyCMS.dev/en/',     'ar' => 'http://craftyCMS.dev/ar/',     'zh' => 'http://craftyCMS.dev/zh',     ); `code` Share link never has the locale in it  
> **username_1**: And those locale IDs are _exactly_ the same as the locale IDs in Settings > Locales?  
> **username_0**: Yes they are all their. But i think i am being stupid now - are all my routes/urls for a section meant to have the locale in the 'Entry URL Format' list per language. This makes it work [slaps head]  
> **username_1**: No, they shouldn't. Can you please send in a support ticket from your Dashboard, so we can take a look at the site and see what's going on?  
> **username_0**: SOLVED: i had a collapsed return array that was empty hiding in my IDE [facepalm] once removed then it all works as expected. Thanks for the support  

---

