This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

bayram4ik
bayram4ik

I needed to use RainLab.Translate in validation responses in Code section of CMS, so I did some dig and figured out how to get translated messages via RainLab\Translate\Models\Message::get() method. The only problem I had it didn't save new messages into the database. After some research I found solution. You should write following inside the onInit function of your page or layout:

function onInit(){
    Message::$locale = config('app.locale');
}

Have a nice coding!

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.