Issue #1977054 by ebargtuo, dooug: Make docs for language API callbacks match the code

merge-requests/26/head
Jennifer Hodgdon 2013-08-16 15:48:32 -07:00
parent b38421cbb3
commit 15d059eff8
2 changed files with 6 additions and 7 deletions

View File

@ -78,7 +78,7 @@ define('LANGUAGE_NEGOTIATION_DEFAULT', 'language-default');
* function mymodule_language_negotiation_info_alter(&$negotiation_info) { * function mymodule_language_negotiation_info_alter(&$negotiation_info) {
* // Replace the core function with our own function. * // Replace the core function with our own function.
* module_load_include('language', 'inc', 'language.negotiation'); * module_load_include('language', 'inc', 'language.negotiation');
* $negotiation_info[LANGUAGE_NEGOTIATION_URL]['callbacks']['negotiation'] = 'mymodule_from_url'; * $negotiation_info[LANGUAGE_NEGOTIATION_URL]['callbacks']['language'] = 'mymodule_from_url';
* $negotiation_info[LANGUAGE_NEGOTIATION_URL]['file'] = drupal_get_path('module', 'mymodule') . '/mymodule.module'; * $negotiation_info[LANGUAGE_NEGOTIATION_URL]['file'] = drupal_get_path('module', 'mymodule') . '/mymodule.module';
* } * }
* *
@ -94,7 +94,6 @@ define('LANGUAGE_NEGOTIATION_DEFAULT', 'language-default');
* } * }
* return $langcode; * return $langcode;
* } * }
* ?>
* @endcode * @endcode
* *
* For more information, see * For more information, see

View File

@ -118,11 +118,11 @@ function hook_language_types_info_alter(array &$language_types) {
* will be available for all the configurable language types. * will be available for all the configurable language types.
* - callbacks: An associative array of functions that will be called to * - callbacks: An associative array of functions that will be called to
* perform various tasks. Possible elements are: * perform various tasks. Possible elements are:
* - negotiation: (required) Name of the callback function that determines * - language: (required) Name of the callback function that determines the
* the language value. * language value.
* - language_switch: (optional) Name of the callback function that * - switcher: (optional) Name of the callback function that determines
* determines links for a language switcher block associated with this * links for a language switcher block associated with this provider. See
* provider. See language_switcher_url() for an example. * language_switcher_url() for an example.
* - url_rewrite: (optional) Name of the callback function that provides URL * - url_rewrite: (optional) Name of the callback function that provides URL
* rewriting, if needed by this provider. * rewriting, if needed by this provider.
* - file: The file where callback functions are defined (this file will be * - file: The file where callback functions are defined (this file will be