Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b10c5f42
Commit
b10c5f42
authored
Mar 04, 2003
by
Dries
Browse files
- Small improvement to locale_init().
parent
0876e268
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
b10c5f42
...
...
@@ -138,7 +138,13 @@ function message_throttle() {
function
locale_init
()
{
global
$languages
,
$user
;
return
(
$languages
?
((
$user
->
uid
&&
$user
->
language
)
?
$user
->
language
:
key
(
$languages
))
:
0
);
if
(
$user
->
uid
&&
$languages
[
$user
->
language
])
{
return
$user
->
language
;
}
else
{
return
key
(
$languages
);
}
}
function
t
(
$string
,
$args
=
0
)
{
...
...
@@ -937,4 +943,4 @@ function page_footer() {
// initialize theme:
$theme
=
theme_init
();
?>
\ No newline at end of file
?>
Write
Preview
Supports
Markdown
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