$this->config->l10n = array();
$this->config->l10n['default'] = $traductions;
+ $this->config->defaultLang = $this->book->lang;
foreach ($langs as $lang) {
$this->config->l10n[$lang->lang_id] = $lang->traductions;
}
+ $iso = l10n::getISOcodes();
+ if ($this->book->parametres->multilang != '') {
+ $flagsDir = $this->vdir . '/images/flags';
+ if (!file_exists($flagsDir)) {
+ mkdir($flagsDir);
+ }
+ $ml = str_replace("\r", "\n", $this->book->parametres->multilang);
+ $ml = str_replace("\n\n", "\n", $ml);
+ $e = explode("\n", $ml);
+ $m = array();
+ foreach ($e as $l1) {
+ $l = explode(',', $l1);
+ $flag = $l[1];
+
+ copy(cubeMedia::getFlagFile($flag), $flagsDir . '/' . $flag . '.png');
+ $l[3] = cubeText::ucfirst($iso[$l[0]]);
+ $m[] = implode(',', $l);
+ }
+
+ $this->config->multilang = implode("\n", $m);
+ }
}
protected function writeExtras() {
//Icons
$res = array_merge($res, $this->writeIcons());
+ $res[] = '#nav #locales{background-color:' . self::colorToCSS($this->theme->parametres->couleurI) . '}';
// Logo
$logo = '#logo{';
# View
$res[] = '.portrait #view{width:' . $w . ';min-height:' . $h . '}';
$res[] = '.landscape #view{width:' . $w2 . ';min-height:' . $h . '}';
- $res[] = '#view{background-color:' . self::colorToCSS($this->theme->parametres->couleurB) . ';color:' . self::colorToCSS($this->theme->parametres->subTextColor) . ';}';
+ $res[] = '#view{background-color:' . self::colorToCSS($this->theme->parametres->couleurB, 1) . ';color:' . self::colorToCSS($this->theme->parametres->subTextColor) . ';}';
# Index
$ratio = $this->width / $this->height;
$thumbh = round(100 / $ratio);