You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fall back to English when the user's or host language isn't installed #501
If host_locale or a user's LOCALE preference names a language that isn't installed:
CAppUI::setUserLocale() calls findLanguage(), which returns null.
$LANGUAGES[null] is read (warning), list(...) unpacks null, and user_locale becomes null.
index.php includes locales//locales.php (warning), so LOCALE_FIRST_DAY is never defined.
The calendar views (MonthCalendar, events/week_view.php, the day-name helper in cleanup_functions.php) stop with a fatal Error: Undefined constant "LOCALE_FIRST_DAY".
This is rare today but becomes common once languages are separate downloads.
Fix
setUserLocale(): when no language matches, fall back to en_US.
Replace the seven copies of include locales/<code>/locales.php + include locales/core.php (index.php ×4, calendar.php, fileviewer.php, modules/system/do_preference_aed.php) with one $AppUI->loadLocale() that checks file_exists() and falls back to en.
Test: set a user's preference to de_DE, rename locales/de, and open the calendar, week view, Gantt and Help as that user: English, no warnings.
Activity
Fall back to English when the user's or host language isn't installed