Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
8d1db84e
Commit
8d1db84e
authored
Apr 16, 2013
by
Bart Visscher
Browse files
Merge pull request #2887 from owncloud/l10n-caching
L10N: cache the result of findLanguage
parents
01d203c7
2180a4c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/l10n.php
View file @
8d1db84e
...
...
@@ -298,10 +298,16 @@ class OC_L10N{
$temp
=
explode
(
';'
,
$i
);
$temp
[
0
]
=
str_replace
(
'-'
,
'_'
,
$temp
[
0
]);
if
(
(
$key
=
array_search
(
$temp
[
0
],
$available
))
!==
false
)
{
if
(
is_null
(
$app
))
{
self
::
$language
=
$available
[
$key
];
}
return
$available
[
$key
];
}
foreach
(
$available
as
$l
)
{
if
(
$temp
[
0
]
==
substr
(
$l
,
0
,
2
)
)
{
if
(
is_null
(
$app
))
{
self
::
$language
=
$l
;
}
return
$l
;
}
}
...
...
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