* message catalogs for PHP and JavaScript have been joined to davadmin.pot
 * textdomain selection has been unified in admin/i18n.inc.php
This commit is contained in:
Jan Dittberner 2007-12-03 14:37:35 +00:00
parent 379fffa19b
commit 0993d2be3a
11 changed files with 291 additions and 377 deletions

View file

@ -285,11 +285,11 @@ if ($_GET) {
default:
errorAsXml(sprintf(_("Unexpected values %s!"), serialize($_GET)));
}
} if (isset($_GET["language"])) {
} else if (isset($_GET["language"])) {
header("Content-Type: text/html; charset=UTF-8");
$smarty->assign("directories", getDirectories());
$smarty->display("directories.html");
}else {
} else {
invalidCall();
}
} elseif ($_POST) {

View file

@ -174,14 +174,10 @@ if ($_SESSION["language"]) {
putenv(sprintf("LANG=%s", $_SESSION["language"]));
putenv(sprintf("LANGUAGE=%s", $_SESSION["language"]));
$_SESSION["locale"] = _setlocale(LC_ALL, $_SESSION["language"]);
// bind text domain for normal code
// bind text domain
bindtextdomain($project,
realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR .
".." . DIRECTORY_SEPARATOR . "po"));
// bind text domain for JavaScript code
bindtextdomain($project . "js",
realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR .
".." . DIRECTORY_SEPARATOR . "po"));
// set the default text domain to project name
textdomain($project);
?>

View file

@ -30,8 +30,6 @@
/** Include the internationalization code. */
require_once(".." . DIRECTORY_SEPARATOR . "i18n.inc.php");
textdomain("davadminjs");
$translatable = file(realpath(implode(DIRECTORY_SEPARATOR,
array(dirname(__FILE__), "..", "..",
"po", "transjs.txt"))));