array('en_US'=>$labels), 'messages'=>array('en_US'=>$messages)); $labels = array(); $messages = array(); if (file_exists($_GET['language'] . '/labels.inc')) { include_once($_GET['language'] . '/labels.inc'); $translations['labels'][$_GET['language']] = $labels; echo '

' . $_GET['language'] . '/labels.inc' . '

'; echo "<?php
\n"; echo "\$labels = array();
\n"; foreach ($translations['labels']['en_US'] as $label=>$content) { if (isset($translations['labels'][$_GET['language']][$label])) echo "\$labels['" . $label . "'] = '" . $translations['labels'][$_GET['language']][$label] . "';
\n"; else echo "\$labels['" . $label . "'] = '" . $content . "';
\n"; } echo "?>
\n"; } if (file_exists($_GET['language'] . '/messages.inc')) { include_once($_GET['language'] . '/messages.inc'); $translations['messages'][$_GET['language']] = $messages; echo '

' . $_GET['language'] . '/messages.inc' . '

'; echo "<?php
\n"; echo "\$messages = array();
\n"; foreach ($translations['messages']['en_US'] as $message=>$content) { if (isset($translations['messages'][$_GET['language']][$message])) echo "\$messages['" . $message . "'] = '" . $translations['messages'][$_GET['language']][$message] . "';
\n"; else echo "\$messages['" . $message . "'] = '" . $content . "';
\n"; } echo "?>
\n"; } } else { echo 'Directory ' . $_GET['language'] . ' not found.'; } ?>