Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
36053901
Commit
36053901
authored
15 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: add hidden option MAIN_SHOW_LANGUAGE_CODE
parent
e4fab24a
Branches
master
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/translate.class.php
+10
-1
10 additions, 1 deletion
htdocs/translate.class.php
with
10 additions
and
1 deletion
htdocs/translate.class.php
+
10
−
1
View file @
36053901
...
@@ -511,6 +511,8 @@ class Translate {
...
@@ -511,6 +511,8 @@ class Translate {
*/
*/
function
get_available_languages
(
$langdir
=
DOL_DOCUMENT_ROOT
,
$maxlength
=
0
)
function
get_available_languages
(
$langdir
=
DOL_DOCUMENT_ROOT
,
$maxlength
=
0
)
{
{
global
$conf
;
// We scan directory langs to detect available languages
// We scan directory langs to detect available languages
$handle
=
opendir
(
$langdir
.
"/langs"
);
$handle
=
opendir
(
$langdir
.
"/langs"
);
$langs_available
=
array
();
$langs_available
=
array
();
...
@@ -520,8 +522,15 @@ class Translate {
...
@@ -520,8 +522,15 @@ class Translate {
{
{
$this
->
load
(
"languages"
);
$this
->
load
(
"languages"
);
if
(
$conf
->
global
->
MAIN_SHOW_LANGUAGE_CODE
)
{
$langs_available
[
$dir
]
=
$dir
.
': '
.
dol_trunc
(
$this
->
trans
(
'Language_'
.
$dir
),
$maxlength
);
$langs_available
[
$dir
]
=
$dir
.
': '
.
dol_trunc
(
$this
->
trans
(
'Language_'
.
$dir
),
$maxlength
);
}
}
else
{
$langs_available
[
$dir
]
=
$this
->
trans
(
'Language_'
.
$dir
);
}
}
}
}
return
$langs_available
;
return
$langs_available
;
}
}
...
...
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