Update api_setup.class.php

This commit is contained in:
ptibogxiv 2022-10-28 21:24:30 +02:00 committed by GitHub
parent 65cbd2c663
commit e450b950d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -616,7 +616,7 @@ class Setup extends DolibarrApi
* *
* @return void * @return void
*/ */
private function translateLabel($object, $lang, $prefix = 'Country', $dict = 'dict') private function translateLabel($object, $lang, $prefix = 'Country', $dict = array('dict'))
{ {
if (!empty($lang)) { if (!empty($lang)) {
// Load the translations if this is a new language. // Load the translations if this is a new language.
@ -624,7 +624,7 @@ class Setup extends DolibarrApi
global $conf; global $conf;
$this->translations = new Translate('', $conf); $this->translations = new Translate('', $conf);
$this->translations->setDefaultLang($lang); $this->translations->setDefaultLang($lang);
$this->translations->loadLangs(array($dict)); $this->translations->loadLangs($dict);
} }
if ($object->code) { if ($object->code) {
$key = $prefix.$object->code; $key = $prefix.$object->code;