On the Translation Dashboard (/admin/content/translation-management/dashboard), if you change the "Show" filter to a custom language you've added to Drupal (using admin/settings/language/add, custom language), then you're not able to assign a translation job.

The dashboard doesn't recognize the language, and thinking it's language neutral, just displays the "Content that is language neutral cannot be sent for translation" error message.

I tracked this down to icl_content/icl_content.dashboard.inc line 574:

$selected_language = _icl_content_default_value('language', language_default()->language);
$selected_language = icl_core_get_language_name($selected_language);

The icl_core_get_language_name function just checks against a predefined list in the icl_languages table. Instead, we should check the drupal core languages table, and I noticed there's already a icl function for this (icl_core_get_language_name), so I suggest just changing to:

$selected_language = _icl_content_default_value('language', language_default()->language);
$selected_language = icl_core_get_drupal_language_name($selected_language);

This fix works for me with a custom language (en-GB), and I'm not aware of any other disadvantage of using the languages table rather than icl_languages.

Comments

dbassendine’s picture

Here's a patch.