Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443915
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443915
Commits
b3bb147c
Commit
b3bb147c
authored
13 years ago
by
Jennifer Hodgdon
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1470080
by Gábor Hojtsy: move base system language hook docs to standard location
parent
905e0aa4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/system/language.api.php
+1
-48
1 addition, 48 deletions
core/modules/system/language.api.php
with
1 addition
and
48 deletions
core/modules/
locale/local
e.api.php
→
core/modules/
system/languag
e.api.php
+
1
−
48
View file @
b3bb147c
...
...
@@ -2,7 +2,7 @@
/**
* @file
* Hooks provided by the
Locale module
.
* Hooks provided by the
base system for language support
.
*/
/**
...
...
@@ -173,53 +173,6 @@ function hook_language_fallback_candidates_alter(array &$fallback_candidates) {
$fallback_candidates
=
array_reverse
(
$fallback_candidates
);
}
/**
* React to a language about to be added or updated in the system.
*
* @param $language
* A language object.
*/
function
hook_locale_language_presave
(
$language
)
{
if
(
$language
->
default
)
{
// React to a new default language.
example_new_default_language
(
$language
);
}
}
/**
* React to a language that was just added to the system.
*
* @param $language
* A language object.
*/
function
hook_locale_language_insert
(
$language
)
{
example_refresh_permissions
();
}
/**
* React to a language that was just updated in the system.
*
* @param $language
* A language object.
*/
function
hook_locale_language_update
(
$language
)
{
example_refresh_permissions
();
}
/**
* Allow modules to react before the deletion of a language.
*
* @param $language
* The language object of the language that is about to be deleted.
*/
function
hook_locale_language_delete
(
$language
)
{
// On nodes with this language, unset the language
db_update
(
'node'
)
->
fields
(
array
(
'language'
=>
''
))
->
condition
(
'language'
,
$language
->
langcode
)
->
execute
();
}
/**
* @} End of "addtogroup hooks".
*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment