setAttribute()
and getAttribute()
methods to allow direct access to translated attributes from the main model.Locales::current()
is used to get/set the attribute from the translation model. But you can also pass a locale after the attribute name like title:en
this will get/set the title
attribute from the en
translation.