~xalioth/stellarium-website/with-gettext

« back to all changes in this revision

Viewing changes to index.php

  • Committer: Fabien Chéreau
  • Date: 2011-05-26 11:16:19 UTC
  • Revision ID: fabien.chereau@gmail.com-20110526111619-pk7h9zelqeho4ztl
Initial test using gettext for web translation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<meta name="Description" content="Stellarium is planetarium software that shows exactly what you see when you look up at the stars. It's easy to use, and free." />
 
5
<meta name="Description" content="<?php q_( "Stellarium is planetarium software that shows exactly what you see when you look up at the stars. It's easy to use, and free.");?>" />
6
6
<meta name="Keywords" content="Stellarium, planetarium, astronomy, stars, planets, constellations, meteors, universe, open source, free software, Fabien Chéreau, astro, freeware, download, stars, planets, realistic, software, sky, program, scientific, educational, free, real, time, Windows, Linux, Apple, Mac, GPL, alioth, milky way, moon, mercury, venus, mars, earth, venus, jupiter, saturn, sun, real time, 3D, openGL, graphic, GL, glut, glu, chart, map, twinkle, photo-realistic, brightness, source, screenshot, Orion, 2001, computer" />
7
7
<title>Stellarium</title>
8
8
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
12
12
<![endif]-->
13
13
</head>
14
14
<body>
 
15
 
 
16
<?php
 
17
require('streams.php');
 
18
require('gettext.php');
 
19
 
 
20
$locale = (isset($_GET['lang']))? $_GET['lang'] : 'en';
 
21
$streamer = new FileReader('./locale/' . $locale . '/stellarium-website.mo');
 
22
$wohoo = new gettext_reader($streamer);
 
23
 
 
24
function q_($msgid) {
 
25
    global $wohoo;
 
26
    print $wohoo ? $wohoo->translate($msgid) : $msgid;
 
27
}
 
28
?>
 
29
 
 
30
 
 
31
 
 
32
 
15
33
<div id="wrap">
16
34
  <!--  <div id="stickynote">
17
35
        <p>sticky note</p>
21
39
  </div>
22
40
  <div id="topbar">
23
41
        <div id="description"><a href="screenshots.html"><img src="img/rotation/rotate.php" alt="screen preview" width="201" height="209" border="0" id="previewscreen"></a>
24
 
          <div id="desctext">Stellarium is a free open source planetarium for your computer. It shows a realistic sky in 3D, just like what you see with the naked eye, binoculars or a telescope. <br>
25
 
                It is being used in planetarium projectors. Just set your coordinates and go. <span><a href="screenshots.html">view screenshots</a></span></div>
 
42
          <div id="desctext">
 
43
          
 
44
          <?php q_("Stellarium is a free open source planetarium for your computer. It shows a realistic sky in 3D, just like what you see with the naked eye, binoculars or a telescope. <br>
 
45
                It is being used in planetarium projectors. Just set your coordinates and go.");?> <span><a href="screenshots.html"><?php q_("view screenshots");?></a></span></div>
26
46
        </div>
27
47
        <div id="downloads">
28
 
          <h2> Downloads </h2>
29
 
          <div class="download"><a href="http://downloads.sourceforge.net/stellarium/stellarium-0.10.6.tar.gz"><img class="downloadimg" src="img/download-linux.png" alt="linux download link" width="63" height="42"><span class="downloadlink">for Linux (source)</span></a> </div>
30
 
          <div class="download"> <a href="http://downloads.sourceforge.net/stellarium/stellarium-0.10.6-Intel.dmg"><img class="downloadimg" src="img/download-mac.png" alt="Mac download link" width="63" height="42"><span class="downloadlink">for Mac OS X</span></a> </div>
31
 
          <div class="download"> <a href="http://downloads.sourceforge.net/stellarium/stellarium-0.10.6.1.exe"><img class="downloadimg" src="img/download-win.png" alt="Windows download link" width="63" height="42"><span class="downloadlink">for Windows</span></a> </div>
32
 
          <div class="download"> <a href="http://downloads.sourceforge.net/stellarium/stellarium_user_guide-0.10.2-1.pdf"><img class="downloadimg" src="img/download-pdf.png" alt="pdf download link" width="63" height="42"><span class="downloadlink">user's guide</span></a></div>
 
48
          <h2> <?php q_("Downloads");?> </h2>
 
49
          <div class="download"><a href="http://downloads.sourceforge.net/stellarium/stellarium-0.10.6.tar.gz"><img class="downloadimg" src="img/download-linux.png" alt="linux download link" width="63" height="42"><span class="downloadlink"><?php q_("for Linux (source)");?></span></a> </div>
 
50
          <div class="download"> <a href="http://downloads.sourceforge.net/stellarium/stellarium-0.10.6-Intel.dmg"><img class="downloadimg" src="img/download-mac.png" alt="Mac download link" width="63" height="42"><span class="downloadlink"><?php q_("for Mac OS X");?></span></a> </div>
 
51
          <div class="download"> <a href="http://downloads.sourceforge.net/stellarium/stellarium-0.10.6.1.exe"><img class="downloadimg" src="img/download-win.png" alt="Windows download link" width="63" height="42"><span class="downloadlink"><?php q_("for Windows");?></span></a> </div>
 
52
          <div class="download"> <a href="http://downloads.sourceforge.net/stellarium/stellarium_user_guide-0.10.2-1.pdf"><img class="downloadimg" src="img/download-pdf.png" alt="pdf download link" width="63" height="42"><span class="downloadlink"><?php q_("user's guide");?></span></a></div>
33
53
        </div>
34
54
  </div>
35
55
  <div id="content">
36
56
        <div id="left">
37
57
          <div id="features">
38
 
                <h2> features </h2>
39
 
                <p><span id="version">in version 0.10.6</span></p>
40
 
                <h3> sky </h3>
 
58
                <h2><?php q_("features");?> </h2>
 
59
                <p><span id="version"><?php q_("in version 0.10.6");?></span></p>
 
60
                <?php q_("<h3>sky</h3>
41
61
                <ul>
42
62
                  <li> default catalogue of over 600,000 stars </li>
43
63
                  <li> extra catalogues with more than 210 million stars </li>
47
67
                  <li> realistic Milky Way </li>
48
68
                  <li> very realistic atmosphere, sunrise and sunset </li>
49
69
                  <li> the planets and their satellites </li>
50
 
                </ul>
51
 
                <h3> interface </h3>
 
70
                </ul>");?>
 
71
                <?php q_("<h3>interface</h3>
52
72
                <ul>
53
73
                  <li> a powerful zoom </li>
54
74
                  <li> time control </li>
57
77
                  <li> spheric mirror projection for your own low-cost dome </li>
58
78
                  <li> all new graphical interface and extensive keyboard control </li>
59
79
                  <li> telescope control </li>
60
 
                </ul>
61
 
                <h3> visualisation </h3>
 
80
                </ul>");?>
 
81
                <?php q_( "<h3>visualisation</h3>
62
82
                <ul>
63
83
                  <li> equatorial and azimuthal grids </li>
64
84
                  <li> star twinkling </li>
65
85
                  <li> shooting stars </li>
66
86
                  <li> eclipse simulation </li>
67
87
                  <li> skinnable landscapes, now with spheric panorama projection </li>
68
 
                </ul>
69
 
                <h3> customizability </h3>
 
88
                </ul>");?>
 
89
                <?php q_( "<h3>customizability</h3>
70
90
                <ul>
71
 
                  <li> plugin system adding artifical satellites, ocular simulation, telescope configuration and more </li>
 
91
              <li> plugin system adding artifical satellites, ocular simulation, telescope configuration and more </li>
72
92
                  <li> ability to add new solar system objects from online resources... </li>
73
93
                  <li> add your own deep sky objects, landscapes, constellation images, scripts... </li>
74
 
                </ul>
 
94
                </ul>");?>
75
95
          </div>
76
96
          <div id="wiki">
77
 
                <h2> wiki </h2>
78
 
                <p> The wiki is the place where stellarium users maintain all the knowledge about the program, and where you can contribute as well.</p>
 
97
                <?php q_("<h2>wiki</h2>
 
98
                <p> The wiki is the place where stellarium users maintain all the knowledge about the program, and where you can contribute as well.</p>");?>
79
99
                <ul class="largelist">
80
100
                  <li> <a href="http://www.stellarium.org/wiki">main page</a> </li>
81
101
                  <li> <a href="http://www.stellarium.org/wiki/index.php/Quickstart_guide">quickstart</a> </li>
87
107
        </div>
88
108
        <div id="center">
89
109
          <div id="news">
90
 
                <h2> news </h2>
91
 
                <?php include("rss2html/rss2html.php"); ?>
 
110
                <?php q_("<h2>news</h2>");
 
111
                 include("rss2html/rss2html.php"); ?>
92
112
          </div>
93
113
        </div>
94
114
        <div id="right">
95
115
          <div id="development">
96
 
                <h2> collaborate </h2>
97
 
                <p> You can learn more about Stellarium, get support and help the project from these links: </p>
 
116
                <?php q_("<h2>collaborate</h2>
 
117
                <p>You can learn more about Stellarium, get support and help the project from these links: </p>");?>
98
118
                <ul class="largelist">
99
119
                  <li> <a href="http://launchpad.net/stellarium">summary</a> </li>
100
120
                  <li> <a href="http://sourceforge.net/forum/forum.php?forum_id=278769">forum</a> </li>