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"]) {
31
31
}
32
32
header ("Last-Modified: " . $ tsstring );
33
33
}
34
+ if (!isset ($ config ["languages " ])) {
35
+ $ config ["languages " ] = array ();
36
+ }
34
37
35
38
?>
36
39
<!DOCTYPE html>
@@ -51,13 +54,18 @@ if ($config["cache"]) {
51
54
<link rel="canonical" href="http://php.net/<?php echo $ _SERVER ['BASE_PAGE ' ]?> ">
52
55
<?php if ($ shortname ): ?>
53
56
<link rel="shorturl" href="<?php echo $ shorturl ?> ">
57
+ <link rel="alternate" href="<?php echo $ shorturl ?> " hreflang="x-default">
54
58
<?php endif ?>
55
59
<?php endif ?>
56
60
57
61
<?php foreach ($ config ["meta-navigation " ] as $ rel => $ page ): ?>
58
62
<link rel="<?php echo $ rel ?> " href="<?php echo $ MYSITE ?> <?php echo $ page ?> ">
59
63
<?php endforeach ?>
60
64
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
+
61
69
<?php foreach ($ CSS as $ filename => $ modified ): ?>
62
70
<link rel="stylesheet" type="text/css" href="<?php echo $ MYSITE ?> cached.php?t=<?php echo $ modified?> &f=<?php echo $ filename?> " media="screen">
63
71
<?php endforeach ?>
Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ function manual_navigation_related(array $setup) {
368
368
// including HTTP header information
369
369
function manual_setup ($setup) {
370
370
global $PGI, $MYSITE, $USERNOTES;
371
+ global $ACTIVE_ONLINE_LANGUAGES;
371
372
372
373
// TODO: get rid of this hack to get the related items into manual_footer
373
374
global $__RELATED;
@@ -404,6 +405,7 @@ function manual_setup($setup) {
404
405
$config = array (
405
406
" current" => " docs" ,
406
407
" breadcrumbs" => $breadcrumbs,
408
+ " languages" => array_keys ($ACTIVE_ONLINE_LANGUAGES),
407
409
" meta-navigation" => array (
408
410
" contents" => $base . $setup[" home" ][0 ],
409
411
" index" => $base . $setup[" up" ][0 ],
You can’t perform that action at this time.
0 commit comments