Skip to content

Commit

Permalink
WEB: WIP for multilanguage support
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Dec 12, 2015
1 parent 8729dc3 commit 34ec679
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 1 deletion.
14 changes: 13 additions & 1 deletion include/Controller.php
Expand Up @@ -23,8 +23,20 @@ class Controller {
public function __construct() {
/* Create a Smarty object. */
$this->_smarty = new Smarty();

/**
* Multilanguage suppot
*/
/*
if (empty($_SESSION['lang']) || !empty($_GET['lang'])) {
$_SESSION['lang'] = empty($_GET['lang']) ? 'en' : $_GET['lang'];
}
$lang = 'de';
$this->_smarty->template_dir = array("templates_$lang", 'templates');
$this->_smarty->compile_id = $lang;
*/
/* Configure smarty. */
$this->_smarty->template_dir = SMARTY_DIR_TEMPLATE;
$this->_smarty->compile_dir = SMARTY_DIR_COMPILE;
$this->_smarty->cache_dir = SMARTY_DIR_CACHE;
$this->_smarty->config_dir = SMARTY_DIR_CONFIG;
Expand Down
85 changes: 85 additions & 0 deletions templates_de/intro_header.tpl
@@ -0,0 +1,85 @@
{* Random screenshot. *}
{assign var='rand_files' value=$random_shot.screenshot->getFiles()}
{assign var='rand_max' value=$rand_files|@count}
{assign var='rand_pos' value=0|rand:$rand_max-1}
{assign var='rand_file' value=$rand_files[$rand_pos]}

{* Introduction header, included from index.tpl *}
<div id="intro_header">
{* Screenshots. *}
<div class="sshots">
<div class="rbtop">
<div>
<p>
{include file='shadowed_text.tpl' text='Bildschirmfotos' shadowcolor='#fff' textcolor='#356a02'}
</p>
</div>
</div>
<div class="rbcontent">
<a href="screenshots/{$random_shot.category}/{$random_shot.screenshot->getCategory()}/{$rand_pos+1}" id="screenshots_random">
<img src="{$smarty.const.DIR_SCREENSHOTS}/{$rand_file.filename}.jpg" width="128" height="96" title="F&uuml;r Vollbild bitte Bild anklicken" alt="Zuf&auml;lliges Bildschirmfoto">
</a>
</div>
<div class="rbbot">
<div>
<p>
<a href="screenshots/" id="screenshots_prev">&laquo; vorheriges</a>
<a href="screenshots/" id="screenshots_next">n&auml;chstes &raquo;</a>
</p>
</div>
</div>
</div>

{* Introduction text. *}
<div class="rbroundbox intro">
<div class="rbtop">
<div>
<p>
{include file='shadowed_text.tpl' text='Was ist ScummVM?' shadowcolor='#fff' textcolor='#356a02'}
</p>
</div>
</div>
<div class="rbcontent">
<div class="rbwrapper">
<p>
ScummVM ist ein Programm, welches Dir es erm&ouml;glicht, bestimmte klassische
Grafik-Adventures (Point-and-Click-Adventures) auszuf&uuml;hren, vorausgesetzt,
Du bist im Besitz der passenden Spieldateien.
ScummVM ersetzt dabei die ausf&uuml;hrbaren Programmdateien,
die urspr&uuml;nglich mit dem Spiel mitgeliefert wurden. Dadurch k&ouml;nnen diese Spiele
auf Systemen gespielt werden, f&uuml;r welche sie nie entwickelt wurden!
</p>
<p>
ScummVM unterst&uuml;tzt viele Adventures, einschlie&szlig;lich der SCUMM-
Spiele von LucasArts (beispielsweise <i>Monkey Island</i> 1-3,
<i>Day of the Tentacle</i>, <i>Sam &amp; Max</i>, ...),
viele AGI- und SCI-Spiele von Sierra (wie <i>King's Quest</i> 1-6,
<i>Space Quest</i> 1-5, ...),
<i>Discworld</i> 1 und 2, <i>Simon the Sorcerer</i> 1 und 2,
<i>Beneath a Steel Sky</i>,
<i>Lure of the Temptress</i>, <i>Broken Sword (dt: Baphomets Fluch)</i> 1 und 2,
<i>Flight of the Amazon Queen </i>, <i>Gobliiins</i> 1-3,
<i>The Legend of Kyrandia</i> 1-3, viele der SCUMM-Spiele f&uuml;r Kinder
von Humongous Entertainment (einschlie&szlig;lich der <i>Freddi-Fisch-</i>
und der <i>T&ouml;ff-T&ouml;ff-</i>Spiele) und noch vielen weiteren mehr.
</p>
<p>
Du findest eine komplette Liste mit allen Informationen dar&uuml;ber,
welche Spiele wie gut unterst&uuml;tzt werden auf der <a href="compatibility/"
Kompatibilit&auml;tsseite</a>.
ScummVM wird laufend verbessert, es lohnt sich also, &ouml;fter vorbeizuschauen.
Unter den Sytemen, auf welchen Du diese Spiele spielen kannst, sind Windows, Linux, Mac OS X,
Dreamcast, PocketPC, PalmOS, amigaOS, BeOS, OS/2, PSP, PS2, SymbianOS und viele mehr.
</p>
<p>
Offizielle Anlaufstellen f&uuml;r Kommentare und Vorschl&auml;ge sind das <a href="http://forums.scummvm.org">
(englischsprachige) Forum</a> und der <a href="irc://irc.freenode.net/scummvm"> (ebenfalls englischsprachige) IRC-Channel #scummvm </a>
im IRC-Netzwerk freenode.net. Die Kommunikation in Forum und IRC sollte ausschlie&szlig;lich auf Englisch erfolgen.

Bitte lies unsere <a href="faq/">h&auml;ufig gestellten Fragen (FAQ)</a>, bevor Du einen Eintrag dort verfasst.
</p>
</div>
</div>
<div class="rbbot"><div><p>&nbsp;</p></div></div>
</div>
</div>

0 comments on commit 34ec679

Please sign in to comment.