Beispiel #1
0
     define('S_NEW_LOCALE_STEP_3_2', 'and a postfix ".inc.php". Like "en-gb.inc.php".');
     define('S_NEW_LOCALE_STEP_4_1', 'To make new locale visible by ZABBIX frontend - extend the php script "/PATH_TO_ZABBIX_FRONTEND/include/locales.inc.php".');
     define('S_NEW_LOCALE_STEP_4_2', 'There You will find an array containing "keys" => "values".');
     define('S_NEW_LOCALE_STEP_4_3', 'Extend this array with Your locale like "your_prefix" => "display_like".');
     define('S_NEW_LOCALE_STEP_4_4', 'You can set "display_like" value in new locale file by adding it or You may leave it as hardcoded string.');
     define('S_NEW_LOCALE_STEP_4_5', 'For example see implementation of other locales.');
     $help_table->addRow(array(S_STEP . SPACE . '1:', S_NEW_LOCALE_STEP_1));
     $help_table->addRow(array(S_STEP . SPACE . '2:', S_NEW_LOCALE_STEP_2));
     $help_table->addRow(array(S_STEP . SPACE . '3:', array(S_NEW_LOCALE_STEP_3_1, BR(), S_NEW_LOCALE_STEP_3_2)));
     $help_table->addRow(array(S_STEP . SPACE . '4:', array(S_NEW_LOCALE_STEP_4_1, BR(), S_NEW_LOCALE_STEP_4_2, BR(), S_NEW_LOCALE_STEP_4_3, BR(), S_NEW_LOCALE_STEP_4_4, BR(), S_NEW_LOCALE_STEP_4_5)));
 } else {
     $help_table->addRow(array(S_STEP . SPACE . '1:', 'Download newly created locale file by pressing "Download".'));
     $help_table->addRow(array(S_STEP . SPACE . '2:', 'Place it to "/PATH_TO_ZABBIX_FRONTEND/include/locales".'));
     $help_table->addRow(array(S_STEP . SPACE . '3:', 'Replace previous locale file with one you have downloaded.'));
 }
 $help->SetHint($help_table);
 show_table_header(array($help, S_LOCALES));
 echo SBR;
 $frmLcls = new CFormTable(S_CREATE . SPACE . S_LOCALE_SMALL . SPACE . S_FROM_SMALL . SPACE . $ZBX_LOCALES[$_REQUEST['srclang']], 'locales.php?action=1', 'post', null, 'form');
 $frmLcls->addOption('id', 'locales');
 $frmLcls->SetHelp($help);
 $fileFrom = 'include/locales/' . $_REQUEST['srclang'] . '.inc.php';
 if (preg_match('/^[a-z0-9_]+$/i', $_REQUEST['srclang']) && file_exists($fileFrom)) {
     include $fileFrom;
     if (!isset($TRANSLATION) || !is_array($TRANSLATION)) {
         error('Passed SOURCE is NOT valid PHP file.');
     }
     $transFrom = $TRANSLATION;
 }
 unset($TRANSLATION);
 $frmLcls->addVar('extlang', $_REQUEST['extlang']);