<p><code>{craft.locale}</code> won't work because the single curly brace syntax is short for <code>{{object.craft.locale}}</code> where <code>object</code> is the element that is currently being edited (in your case, the entry).  You can read more about that here: <a href="https://craftcms.com/docs/assets-fields#dynamic-subfolder-paths" rel="nofollow">https://craftcms.com/docs/assets-fields#dynamic-subfolder-paths</a></p>

<p>Your screenshot shows the double curly syntax, though (which should work fine).</p>

<p>Alternatively you could use <code>{locale}</code>, which would translate into <code>{{object.locale}}</code>, which would be the currently locale of the entry.</p>

CC BY-SA 3.0
2016-07-25T23:29:13.667Z
2016-07-25T23:29:13.667Z
Brad Bell
<p>We have a localized site with separate public directories. I'm looking for a method to handle image uploads for the different asset paths.</p>

<p>For example when uploading an asset within a particular locale, the image will be deposited in that <code>public_*/uploads</code> folder.</p>

<p><a href="https://i.sstatic.net/BhqFN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BhqFN.png" alt="Asset Upload Locale"></a></p>

<p>I thought perhaps concatenating the <code>{craft.locale}</code> in the asset path might work but it threw an error. I'm thinking that the locale doesn't change when selecting the language from the sidebar or asset dropdown.</p>

<p><a href="https://i.sstatic.net/qtDNA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qtDNA.png" alt="AssetPaths"></a></p>

<p>I'm pretty stuck on this one and there doesn't seem to be any answers online. Any other ideas or solutions would be appreciated.</p>

<assets><localization>
Change asset upload path based on locale
# Change asset upload path based on locale

(Asked by: username_0 on 2016-07-25)

We have a localized site with separate public directories. I'm looking for a method to handle image uploads for the different asset paths.

For example when uploading an asset within a particular locale, the image will be deposited in that `public_*/uploads` folder.

[![Asset Upload Locale](https://i.sstatic.net/BhqFN.png)](https://i.sstatic.net/BhqFN.png)

I thought perhaps concatenating the `{craft.locale}` in the asset path might work but it threw an error. I'm thinking that the locale doesn't change when selecting the language from the sidebar or asset dropdown.

[![AssetPaths](https://i.sstatic.net/qtDNA.png)](https://i.sstatic.net/qtDNA.png)

I'm pretty stuck on this one and there doesn't seem to be any answers online. Any other ideas or solutions would be appreciated.

**Tags:** assets, localization


---

## 1 answers

### Answer by username_1 on 2016-07-25. Score: 2

`{craft.locale}` won't work because the single curly brace syntax is short for `{{object.craft.locale}}` where `object` is the element that is currently being edited (in your case, the entry). You can read more about that here: <https://craftcms.com/docs/assets-fields#dynamic-subfolder-paths>

Your screenshot shows the double curly syntax, though (which should work fine).

Alternatively you could use `{locale}`, which would translate into `{{object.locale}}`, which would be the currently locale of the entry.


---

