https://api.drupal.org/api/drupal/includes!locale.inc/function/locale_add_language/7
See also: https://drupal.org/node/1679096
locale_add_language('en-CA', 'English (Canada)', 'English (Canada)', LANGUAGE_LTR, '', '', true, true);
Expected result: Add a new language, and set it as default, with an empty prefix
Actual result: Adds a new language, but, since $prefix is tested using empty()
instead of === NULL
, the new language gets $langcode
set as its prefix.
1. local_add_language()
's signature should be changed to have $prefix = NULL
2. $prefix
should only be set to $langcode
when it is literally NULL
Request for comments: what are your foreseeable good/bad consequences with this suggested tweak?