Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Administrator
Drupal
Commits
15d059ef
Commit
15d059ef
authored
11 years ago
by
Jennifer Hodgdon
Browse files
Options
Download
Email Patches
Plain Diff
Issue #1977054 by ebargtuo, dooug: Make docs for language API callbacks match the code
parent
b38421cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/language.inc
+1
-2
includes/language.inc
modules/system/language.api.php
+5
-5
modules/system/language.api.php
with
6 additions
and
7 deletions
+6
-7
includes/language.inc
View file @
15d059ef
...
...
@@ -78,7 +78,7 @@ define('LANGUAGE_NEGOTIATION_DEFAULT', 'language-default');
* function mymodule_language_negotiation_info_alter(&$negotiation_info) {
* // Replace the core function with our own function.
* 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';
* }
*
...
...
@@ -94,7 +94,6 @@ define('LANGUAGE_NEGOTIATION_DEFAULT', 'language-default');
* }
* return $langcode;
* }
* ?>
* @endcode
*
* For more information, see
...
...
This diff is collapsed.
Click to expand it.
modules/system/language.api.php
View file @
15d059ef
...
...
@@ -118,11 +118,11 @@ function hook_language_types_info_alter(array &$language_types) {
* will be available for all the configurable language types.
* - callbacks: An associative array of functions that will be called to
* perform various tasks. Possible elements are:
* -
negotiation
: (required) Name of the callback function that determines
*
the
language value.
* -
language_
switch: (optional) Name of the callback function that
*
determines
links for a language switcher block associated with this
*
provider. See
language_switcher_url() for an example.
* -
language
: (required) Name of the callback function that determines
the
* language value.
* - switch
er
: (optional) Name of the callback function that
determines
* links for a language switcher block associated with this
provider. See
* language_switcher_url() for an example.
* - url_rewrite: (optional) Name of the callback function that provides URL
* rewriting, if needed by this provider.
* - file: The file where callback functions are defined (this file will be
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help