You are here

function i18n_select in Internationalization 7

Switch select Mode on off if enabled

Usage for disabling content selection for a while then return to previous state

// Disable selection, but store previous mode $previous = i18n_select(FALSE);

// Other code to be run without content selection here ..........................

// Return to previous mode i18n_select($previous);

Parameters

$value: Optional, enable/disable selection: TRUE/FALSE

Return value

boolean Previous selection mode (TRUE/FALSE)

7 calls to i18n_select()
i18n_menu_parent_options in i18n_menu/i18n_menu.admin.inc
Return a list of menu items that are valid possible parents for the given menu item.
i18n_select_block_list_alter in i18n_select/i18n_select.module
Implements hook_block_list_alter().
i18n_select_init in i18n_select/i18n_select.module
Implements hook_init().
i18n_select_mode in i18n_select/i18n_select.module
Get current mode for i18n selection
i18n_sync_node_translation in i18n_sync/i18n_sync.node.inc
Synchronizes fields for node translation.

... See full list

7 string references to 'i18n_select'
i18nForumTestCase::setUp in i18n_forum/i18n_forum.test
Sets up a Drupal site for running functional and integration tests.
I18NSelectAdminViewsAjax::setUp in i18n_select/i18n_select.test
Sets up a Drupal site for running functional and integration tests.
i18nSelectTestCase::setUp in i18n_select/i18n_select.test
Sets up a Drupal site for running functional and integration tests.
i18n_select_check_query in i18n_select/i18n_select.module
Check whether we should apply language conditions here:
i18n_select_query_node_access_alter in i18n_select/i18n_select.module
Implementation of hook_query_node_access_alter().

... See full list

File

./i18n.module, line 307
Internationalization (i18n) module.

Code

function i18n_select($value = NULL) {
  static $mode = FALSE;
  if (isset($value)) {
    $previous = $mode;
    $mode = $value;
    return $previous;
  }
  else {
    return $mode;
  }
}