(From #981524: system_date_format_save() doesn't save localized date formats.) The API function language_list() does not include documentation of its return value. Since the return value is a nested array, this is an issue. Consider the following code in system_date_format_save():
$languages = language_list('enabled');
$languages = $languages;
Reading the API doc for language_list(), I have no idea why the list of languages is in index 1 of the return value.
Documentation of the structure of the array children is also desirable; see #981524: system_date_format_save() doesn't save localized date formats.
Document the return value of the function. Patch in #8 adds this and a couple other fixes for the function's docblock.
Add an @see reference to
- #1309742: Add inline comment clarifying use of language_list() in system_date_format_save()
- #1260510: Introduce a language_load($langcode)
User interface changes