To translate an app I read in some post that you only need to write
'language'=>'es', // Este es el lenguaje en el que querés que muestre las cosas
in the main.php
As I see this is for translate some messages, the error messages for example. My doubt is how can I translate something in the view of a CRUD file, for example I created a Countrys crud. If I wanna modify the 'new countrys' option for 'nuevo pais' how is the correct way, just changing it in the views/countrys file or there are other way.
Another question is where are the other messages that are translated in case I need to change some message for example: 'Error you mustn't leave the name blank' instead of 'Error you mustn't leave the name null'
You need to use view translation together with message translation. For the former, you mainly need to create translated view files (es/viewName.php). For the latter (error messages, labels, etc.), you need to use Yii::t() at appropriate places.