/** * Implements hook_language_negotiation_info(). */ function {{ machine_name }}_language_negotiation_info() { return array( 'custom_language_provider' => array( 'callbacks' => array( 'language' => 'custom_language_provider_callback', 'switcher' => 'custom_language_switcher_callback', 'url_rewrite' => 'custom_language_url_rewrite_callback', ), 'file' => drupal_get_path('module', 'custom') . '/custom.module', 'weight' => -4, 'types' => array('custom_language_type'), 'name' => t('Custom language negotiation provider'), 'description' => t('This is a custom language negotiation provider.'), 'cache' => 0, ), ); }