I am using Yii 2.0 and created a file in \messages\pt_BR\app.php
But I don’t know how it suppose to be. I’m trying this:
<?php
return ['create' => 'criar'];
But it isn’t working.
I am using Yii 2.0 and created a file in \messages\pt_BR\app.php
But I don’t know how it suppose to be. I’m trying this:
<?php
return ['create' => 'criar'];
But it isn’t working.
So… Does anybody knows how I supose to format my translation file in Yii 2.0?
The format you use looks fine, just a simple array is expected with a phrase to translate as a key and a translation as a value.
Make sure your app language is used as a subfolder name. BTW, Yii2 guide uses a dash, not an underscore for locales, so looks like a typo in your use case… You may also simply use ‘pt’ as a subfolder name, if it’s applicable.
If it’s not the case, how do you call your translation? Have you configured them specifically according to the guide?
Thank`s.