diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index ff6147977f3..aa54b3f330c 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -401,7 +401,7 @@ class FormMail extends Form
// Define output language
$outputlangs = $langs;
$newlang = '';
- if (!empty($conf->global->MAIN_MULTILANGS) && !empty($this->param['langsmodels'])) {
+ if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($this->param['langsmodels'])) {
$newlang = $this->param['langsmodels'];
}
if (!empty($newlang)) {
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index bd881416fa9..ed944dec414 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -1264,7 +1264,7 @@ class FormTicket
// Define output language
$outputlangs = $langs;
$newlang = '';
- if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $this->param['langsmodels'];
}
if (!empty($newlang)) {
@@ -1311,7 +1311,7 @@ class FormTicket
// Define output language
$outputlangs = $langs;
$newlang = '';
- if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $this->param['langsmodels'];
}
if (!empty($newlang)) {
diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php
index ee69ccf4a87..5ee8ac517a8 100644
--- a/htdocs/core/lib/categories.lib.php
+++ b/htdocs/core/lib/categories.lib.php
@@ -49,7 +49,7 @@ function categories_prepare_head(Categorie $object, $type)
$head[$h][2] = 'photos';
$h++;
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
$head[$h][0] = DOL_URL_ROOT.'/categories/traduction.php?id='.$object->id.'&type='.$type;
$head[$h][1] = $langs->trans("Translation");
$head[$h][2] = 'translation';
diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php
index 92cc140f299..f71c4231038 100644
--- a/htdocs/core/lib/doc.lib.php
+++ b/htdocs/core/lib/doc.lib.php
@@ -57,7 +57,7 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu
if ($idprod) {
$prodser->fetch($idprod);
// If a predefined product and multilang and on other lang, we renamed label with label translated
- if (!empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS') && ($outputlangs->defaultlang != $langs->defaultlang)) {
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) {
$label = $prodser->multilangs[$outputlangs->defaultlang]["label"];
}
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 5cad13a6e57..6e0dcb3b83a 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -149,7 +149,7 @@ function member_type_prepare_head(AdherentType $object)
$h++;
// Multilangs
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
$head[$h][0] = DOL_URL_ROOT."/adherents/type_translation.php?rowid=".$object->id;
$head[$h][1] = $langs->trans("Translation");
$head[$h][2] = 'translation';