mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 12:36:23 +05:30
Adding language support - currently only English and German
system/htmly.php - Loads language files from folder lang/ - Sets language settings for date and time format system/includes/dispatch.php - function i18n() returns translated strings
This commit is contained in:
parent
5423d65cdc
commit
4fde479aba
41 changed files with 352 additions and 147 deletions
|
|
@ -2,12 +2,12 @@
|
|||
<?php if (!empty($posts)) { ?>
|
||||
<table class="post-list">
|
||||
<tr class="head">
|
||||
<th>Title</th>
|
||||
<th>Published</th><?php if (config("views.counter") == "true"): ?>
|
||||
<th><?php echo i18n('Title');?></th>
|
||||
<th><?php echo i18n('Published');?></th><?php if (config("views.counter") == "true"): ?>
|
||||
<th>Views</th><?php endif; ?>
|
||||
<th>Author</th>
|
||||
<th>Tag</th>
|
||||
<th>Operations</th>
|
||||
<th><?php echo i18n('Author');?></th>
|
||||
<th><?php echo i18n('Tag');?></th>
|
||||
<th><?php echo i18n('Operations');?></th>
|
||||
</tr>
|
||||
<?php $i = 0;
|
||||
$len = count($posts); ?>
|
||||
|
|
@ -24,13 +24,13 @@
|
|||
?>
|
||||
<tr class="<?php echo $class ?>">
|
||||
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
|
||||
<td><?php echo date('d F Y', $p->date) ?></td>
|
||||
<td><?php echo strftime($date_format, $p->date) ?></td>
|
||||
<?php if (config("views.counter") == "true"): ?>
|
||||
<td><?php echo $p->views ?></td><?php endif; ?>
|
||||
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
|
||||
<td><?php echo $p->tag ?></td>
|
||||
<td><a href="<?php echo $p->url ?>/edit?destination=admin/posts">Edit</a> <a
|
||||
href="<?php echo $p->url ?>/delete?destination=admin/posts">Delete</a></td>
|
||||
<td><a href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
|
||||
href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
|
@ -45,5 +45,5 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<?php } else {
|
||||
echo 'No posts found!';
|
||||
echo i18n('No_posts_found') . '!';
|
||||
} ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue