<p>Yii already provides translations for those in multiple languages.  Check in the <code>craft/app/framework/messages</code> folder to see a list of locales it supports.</p>

<p>If you want it in a locale they haven't translated, yet, then you can provide your own <a href="http://buildwithcraft.com/help/static-translations" rel="nofollow">static translation</a> and Craft will use it.</p>

CC BY-SA 3.0
2014-12-11T08:48:06.640Z
Ah. I found the problem. The folder name was "no" (general norwegian), but the language is actually called "nb" (norsk bokmål). So it was just the wrong folder name. Changed to "nb" and it gave me the correct translations. Thanks.
peirix
CC BY-SA 3.0
2014-12-10T19:26:38.160Z
2014-12-10T19:26:38.160Z
Brad Bell
<p>Is there a way to add the validator strings into the translations?</p>

<pre><code>$message=$this-&gt;message!==null?$this-&gt;message:Yii::t('yii','{attribute} cannot be blank.');

/* craft/app/validators/CRequiredValidator.php - line 70 */
</code></pre>

<p>I'd like to translate that text without changing any of the code (which might be overwritten and lost with an update)</p>

<language><validation>
Translating validator errors
# Translating validator errors

(Asked by: username_0 on 2014-12-10)

Is there a way to add the validator strings into the translations?
$message=$this->message!==null?$this->message:Yii::t('yii','{attribute} cannot be blank.');

/* craft/app/validators/CRequiredValidator.php - line 70 */

I'd like to translate that text without changing any of the code (which might be overwritten and lost with an update)

**Tags:** language, validation


---

## 1 answers

### Answer by username_1 on 2014-12-10. Score: 1 | Accepted answer

Yii already provides translations for those in multiple languages. Check in the `craft/app/framework/messages` folder to see a list of locales it supports.

If you want it in a locale they haven't translated, yet, then you can provide your own [static translation](http://buildwithcraft.com/help/static-translations) and Craft will use it.

> **Comments:**
> **username_0**: Ah. I found the problem. The folder name was "no" (general norwegian), but the language is actually called "nb" (norsk bokmål). So it was just the wrong folder name. Changed to "nb" and it gave me the correct translations. Thanks.  

---

