class Lato::ApplicationController

def set_default_locale

The default locale is the locale of the user if exists, otherwise is the default locale of the application.
This method set the default locale for the application.
def set_default_locale
  return unless @session.valid?
  I18n.locale = @session.user&.locale || I18n.default_locale
end