Multilanguage titles in template

Webmaster may often need to have titles written in a template. It is simple HTML topic on one language page. But if there is a need to have any 2nd language, there might be a problem for those not very familiar with CMSimple and PHP. There are various ways. This one may be the simple one:
1. In your language file (cmsimple/languages) define a variable for each label you use in your template. e.g.:

$tx['label']['your_label_1']="Your Label 1";
$tx['label']['your_label_2']="Your Label 2";
$tx['label']['your_label_3']="Your Label 3";

2. Use these variables in your template on desired places. e.g.:

<table>
<tr>
<td><?php echo $tx['label']['your_label_1'];?></td>
<td><?php echo $tx['label']['your_label_2'];?></td>
<td><?php echo $tx['label']['your_label_3'];?></td>
</tr>
</table>
tips_and_tricks/multilanguage_titles_in_template.txt · Last modified: 2018/04/05 14:48 (external edit)
Webdesign: NMuD chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0