diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index e71ee255981..fc8794aa1a8 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -246,7 +246,7 @@ abstract class ActionsCardCommon
}
// Language
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
$this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang ? $this->object->default_lang : $conf->global->MAIN_LANG_DEFAULT), 'default_lang', 0, 0, 1);
}
@@ -306,7 +306,7 @@ abstract class ActionsCardCommon
$arr = $formcompany->typent_array(1);
$this->tpl['typent'] = $arr[$this->object->typent_code];
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
//$s=picto_from_langcode($this->default_lang);
//print ($s?$s.' ':'');
diff --git a/htdocs/societe/canvas/company/tpl/card_create.tpl.php b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
index 58752a1bc7b..d70277dc58d 100644
--- a/htdocs/societe/canvas/company/tpl/card_create.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
@@ -189,7 +189,7 @@ for ($i = 1; $i <= 4; $i++) {
control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?> |
-global->MAIN_MULTILANGS)) { ?>
+
| trans("DefaultLang"); ?> |
control->tpl['select_lang']; ?> |
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 90aafe95f5d..b5a49e9e18d 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -1804,7 +1804,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
print ''.$langs->trans("Currency".$conf->currency).'
';
}
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
print '| '.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).' | '."\n";
print img_picto('', 'language', 'class="pictofixedwidth"').$formadmin->select_language(GETPOST('default_lang', 'alpha') ? GETPOST('default_lang', 'alpha') : ($object->default_lang ? $object->default_lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone');
print ' | ';
@@ -2554,7 +2554,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Default language
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
print '
| '.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).' | '."\n";
print img_picto('', 'language').$formadmin->select_language($object->default_lang, 'default_lang', 0, 0, 1);
print ' | ';
@@ -3071,7 +3071,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Default language
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
print '
| '.$langs->trans("DefaultLang").' | ';
//$s=picto_from_langcode($object->default_lang);
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index 0c1370f7440..0ff76102582 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -535,7 +535,7 @@ if ($sql_select) {
// Product
if ($objp->fk_product > 0) {
// Define output language
- if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$prod = new Product($db);
$prod->fetch($objp->fk_product);
diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php
index 22b9dc56fae..6110fc7a5e5 100644
--- a/htdocs/societe/paymentmodes.php
+++ b/htdocs/societe/paymentmodes.php
@@ -1548,7 +1548,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$allowgenifempty = 0;
// Language code (if multilang)
- if (!empty($conf->global->MAIN_MULTILANGS)) {
+ if (getDolGlobalInt('MAIN_MULTILANGS')) {
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$formadmin = new FormAdmin($db);
$defaultlang = $langs->getDefaultLang();
|