I have a multilanguage site with users (autors) that can manage content only in one language.
A content type 'News' that I created has i18n's Language select on the bottom of create new News form.
I managed to get users language as selected option but I would like to lock this option down to preferred language for this user.
With hook_form_alter I can change $form['language']['#options'] to only one language but still displays all languages.
switch ($form_id) {
case 'news_node_form':
$form['language']['#options'] = array('ru' => 'Russian');
//print_r($form);
break;
}
}
This does fill language options with only Russian but still displaying all languages.
Is there any other solution to hide unwanted languages or just lock this to one language and even not showing this select field?
Read »








