"applyLocale()" does not apply desired locale when "inheritLocale" is set
Following up on #1890 (closed) it seems that the locale string in the language
column in the civicrm_uf_match
table is also redundant.
It is set here when there is a locale requested in a URL that uses the lcMessages
query param or when there's an existing locale set in the session.
The session locale is set from the $ufm->language
locale here when there's a logged-in user and the locale hasn't been determined by the lcMessages
query param or there's no locale set in the session.
I cannot find anywhere else in the CiviCRM Core code where $ufm->language
is read or set, so this appears to be circular logic that seems redundant to me.
Can we remove it since it's never actually used for anything practical?
Correction: both the $ufm->language
and lcMessages
session variable are set here, but this only sets the locale for the Contact/User that saves that particular form. It doesn't alter the circularity of the logic in applyLocale()
.