<p>In order to do the namespaced trick in Craft 3, you'd do it like this:</p>

<p>Create your folder structure like this for your locale with one file for the Control Panel and one for the front-end of the site:</p>

<p><a href="https://i.sstatic.net/FmhvE.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FmhvE.jpg" alt="enter image description here"></a></p>

<p>Contents of files:</p>

<p><a href="https://i.sstatic.net/K5A2n.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/K5A2n.jpg" alt="enter image description here"></a></p>

<p>Settings for Checkbox field:</p>

<p><a href="https://i.sstatic.net/RsbWj.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RsbWj.jpg" alt="enter image description here"></a></p>

<p>Template code:</p>

<p><a href="https://i.sstatic.net/jklcE.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jklcE.jpg" alt="enter image description here"></a></p>

<p>Front-end results:</p>

<p><a href="https://i.sstatic.net/qtttt.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qtttt.jpg" alt="enter image description here"></a></p>

<p>Edit entry results:</p>

<p><a href="https://i.sstatic.net/BcGvL.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BcGvL.jpg" alt="enter image description here"></a></p>

CC BY-SA 4.0
2018-11-28T20:31:56.837Z
Thanks Brad. I'm using static translations successfully elsewhere in the site but for my particular use case (slightly more complex than fruits) I'm wanting to drill down more specifically and translate _only_ the checkbox field's labels based on their value. That's why the post I referenced was interesting. Is it at all possible to do it the namespacing way in Craft3?
Dr_Codswallop
CC BY-SA 4.0
2018-11-30T23:52:58.307Z
Updated answer.
Brad Bell
CC BY-SA 4.0
2018-11-28T04:55:00.963Z
2018-11-30T23:52:44.880Z
2018-11-30T23:52:44.880Z
Brad Bell
<p>I'm trying to translate the labels for a global checkbox field in my front-end templates like in this post: <a href="https://craftcms.stackexchange.com/questions/13709/is-there-a-way-to-have-checkbox-field-labels-translatable">Is there a way to have checkbox field labels translatable?</a>. 
This looked promising but I can't seem to get it working (maybe it's Craft2 and things have changed in 3)</p>

<p>Basically it's using namespacing in the translations file e.g for a French translation file</p>

<pre><code>return [
  'field.fruits.option.apple.label' =&gt; 'pomme',
  'field.fruits.option.lemon.label' =&gt; 'citron',
];
</code></pre>

<p>But no translations showing in the template when I try</p>

<pre><code>{% for fruit in myGlobalSet.fruits %}
    {{ fruit.label|t }}
{% endfor %} 
</code></pre>

<p>Any ideas? I'm sure it must be syntax related or wrong namespacing but I'm not getting any errors.</p>

<templating><localization><globals><checkboxes><label>
Translating checkbox labels
# Translating checkbox labels

(Asked by: username_0 on 2018-11-27)

I'm trying to translate the labels for a global checkbox field in my front-end templates like in this post: Is there a way to have checkbox field labels translatable?. 
This looked promising but I can't seem to get it working (maybe it's Craft2 and things have changed in 3)
Basically it's using namespacing in the translations file e.g for a French translation file
return [
  'field.fruits.option.apple.label' => 'pomme',
  'field.fruits.option.lemon.label' => 'citron',
];

But no translations showing in the template when I try
{% for fruit in myGlobalSet.fruits %}
    {{ fruit.label|t }}
{% endfor %} 

Any ideas? I'm sure it must be syntax related or wrong namespacing but I'm not getting any errors.

**Tags:** templating, localization, globals, checkboxes, label

---

## 1 answers

### Answer by username_1 on 2018-11-28. Score: 0 | Accepted answer

In order to do the namespaced trick in Craft 3, you'd do it like this:

Create your folder structure like this for your locale with one file for the Control Panel and one for the front-end of the site:

[![enter image description here](https://i.sstatic.net/FmhvE.jpg)](https://i.sstatic.net/FmhvE.jpg)

Contents of files:

[![enter image description here](https://i.sstatic.net/K5A2n.jpg)](https://i.sstatic.net/K5A2n.jpg)

Settings for Checkbox field:

[![enter image description here](https://i.sstatic.net/RsbWj.jpg)](https://i.sstatic.net/RsbWj.jpg)

Template code:

[![enter image description here](https://i.sstatic.net/jklcE.jpg)](https://i.sstatic.net/jklcE.jpg)

Front-end results:

[![enter image description here](https://i.sstatic.net/qtttt.jpg)](https://i.sstatic.net/qtttt.jpg)

Edit entry results:

[![enter image description here](https://i.sstatic.net/BcGvL.jpg)](https://i.sstatic.net/BcGvL.jpg)

> **Comments:**
> **username_0**: Thanks Brad. I'm using static translations successfully elsewhere in the site but for my particular use case (slightly more complex than fruits) I'm wanting to drill down more specifically and translate _only_ the checkbox field's labels based on their value. That's why the post I referenced was interesting. Is it at all possible to do it the namespacing way in Craft3?  
> **username_1**: Updated answer.  

---

