/**
 * Implements hook_field_available_languages_alter().
 */
function {{ machine_name }}_field_available_languages_alter(&$languages, $context) {
  // Add an unavailable language.
  $languages[] = 'xx';

  // Remove an available language.
  $index = array_search('yy', $languages);
  unset($languages[$index]);
}
