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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
07c828d3
Commit
07c828d3
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Introduce method loadLangs to save code lines
parent
02d9a41e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/commande/list.php
+1
-6
1 addition, 6 deletions
htdocs/commande/list.php
htdocs/core/class/translate.class.php
+14
-0
14 additions, 0 deletions
htdocs/core/class/translate.class.php
with
15 additions
and
6 deletions
htdocs/commande/list.php
+
1
−
6
View file @
07c828d3
...
...
@@ -43,12 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once
DOL_DOCUMENT_ROOT
.
'/compta/facture/class/facture.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/product/class/product.class.php'
;
$langs
->
load
(
'orders'
);
$langs
->
load
(
'sendings'
);
$langs
->
load
(
'deliveries'
);
$langs
->
load
(
'companies'
);
$langs
->
load
(
'compta'
);
$langs
->
load
(
'bills'
);
$langs
->
loadLangs
(
array
(
"orders"
,
'sendings'
,
'deliveries'
,
'companies'
,
'compta'
,
'bills'
));
$action
=
GETPOST
(
'action'
,
'alpha'
);
$massaction
=
GETPOST
(
'massaction'
,
'alpha'
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/class/translate.class.php
+
14
−
0
View file @
07c828d3
...
...
@@ -138,6 +138,20 @@ class Translate
}
/**
* Load translation files.
*
* @param array $domains Array of lang files to load
* @return int <0 if KO, 0 if already loaded or loading not required, >0 if OK
*/
function
loadLangs
(
$domains
)
{
foreach
(
$domains
as
$domain
)
{
$this
->
load
(
$domain
);
}
}
/**
* Load translation key-value for a particular file, into a memory array.
* If data for file already loaded, do nothing.
...
...
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