How can I grant anonymous users access to the locale language select form without hacking core? I am attempting to override the user registration from at user/register to allow users to select their own language upon login.

Based on this helpful answer, I came up with this override:

function hook_form_user_register_form_alter(&amp;$form, &amp;$form_state, $form_id) {

  $form['locale']['language'] = array(
    '#type' =&gt; (count($names) &lt;= 5 ? 'radios' : 'select'),
    '#title' =&gt; t('Language'),
    '#default_value' =&gt; $user_preferred_language-&gt;language,
    '#options' =&gt; $names,
    '#description' =&gt; $mode ? t("This account's default language for e-mails, and preferred language for site presentation.") : t("This account's default language for e-mails."),
  );


However, it doesn't work because of the following code in locale.module:

  $form['locale'] = array(
    '#type' =&gt; 'fieldset',
    '#title' =&gt; t('Language settings'),
    '#weight' =&gt; 1,
    '#access' =&gt; ($form['#user_category'] == 'account' || ($form['#user_category'] == 'register' &amp;&amp; user_access('administer users'))),
  );


Simply deleting &amp;&amp; user_access('administer users') from locale.module and clearing the cache makes it work, but if I do that I'm hacking core.

How can I remove the bit about &amp;&amp; user_access('administer users') without hacking core?
You should be able to just replace the #access property for the element added by the locale module in your form alter:

function MYMODULE_form_user_register_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  // Use exactly the same access logic as the original, 
  // without checking for the 'administer users' permission
  $form['locale']['#access'] = ($form['#user_category'] == 'account' || ($form['#user_category'] == 'register'));
}


That's essentially the same as taking the &amp;&amp; user_access('administer users') part out of the core file.

All you need to make sure of is that your module hooks are run after those of the locale module (so the element actually exists when you try to alter it), which you can see how to do here.