File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ if ($config["cache"]) {
3131 }
3232 header ("Last-Modified: " . $ tsstring );
3333}
34+ if (!isset ($ config ["languages " ])) {
35+ $ config ["languages " ] = array ();
36+ }
3437
3538?>
3639<!DOCTYPE html>
@@ -51,13 +54,18 @@ if ($config["cache"]) {
5154 <link rel="canonical" href="http://php.net/<?php echo $ _SERVER ['BASE_PAGE ' ]?> ">
5255<?php if ($ shortname ): ?>
5356 <link rel="shorturl" href="<?php echo $ shorturl ?> ">
57+ <link rel="alternate" href="<?php echo $ shorturl ?> " hreflang="x-default">
5458<?php endif ?>
5559<?php endif ?>
5660
5761<?php foreach ($ config ["meta-navigation " ] as $ rel => $ page ): ?>
5862 <link rel="<?php echo $ rel ?> " href="<?php echo $ MYSITE ?> <?php echo $ page ?> ">
5963<?php endforeach ?>
6064
65+ <?php foreach ($ config ["languages " ] as $ code ): ?>
66+ <link rel="alternate" href="<?php echo $ MYSITE ?> /manual/<?php echo $ code?> /<?php echo $ config ["thispage " ] ?> " hreflang="<?php echo $ code?> ">
67+ <?php endforeach ?>
68+
6169<?php foreach ($ CSS as $ filename => $ modified ): ?>
6270<link rel="stylesheet" type="text/css" href="<?php echo $ MYSITE ?> cached.php?t=<?php echo $ modified?> &f=<?php echo $ filename?> " media="screen">
6371<?php endforeach ?>
Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ function manual_navigation_related(array $setup) {
368368// including HTTP header information
369369function manual_setup ($setup) {
370370 global $PGI, $MYSITE, $USERNOTES;
371+ global $ACTIVE_ONLINE_LANGUAGES;
371372
372373 // TODO: get rid of this hack to get the related items into manual_footer
373374 global $__RELATED;
@@ -404,6 +405,7 @@ function manual_setup($setup) {
404405 $config = array (
405406 " current" => " docs" ,
406407 " breadcrumbs" => $breadcrumbs,
408+ " languages" => array_keys ($ACTIVE_ONLINE_LANGUAGES),
407409 " meta-navigation" => array (
408410 " contents" => $base . $setup[" home" ][0 ],
409411 " index" => $base . $setup[" up" ][0 ],
You can’t perform that action at this time.
0 commit comments