Skip to content

Commit

Permalink
feat: changed default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
jeslage committed Apr 14, 2023
1 parent bfe4953 commit d0cf0bf
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 50 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ Icon
!/content/error
!/content/articles
/content/articles/*
!/content/articles/articles.de.txt
!/content/media/media.de.txt
!/content/articles/articles.en.txt
/content/media/*
!/content/media/media.en.txt
!/content/search

# Frontend
Expand Down
21 changes: 0 additions & 21 deletions content/articles/articles.de.txt

This file was deleted.

5 changes: 5 additions & 0 deletions content/articles/articles.en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Title: Articles

----

Uuid: OfWmF3KRUe9dLMGn
5 changes: 0 additions & 5 deletions content/error/error.de.txt

This file was deleted.

5 changes: 5 additions & 0 deletions content/error/error.en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Title: Error

----

Uuid: 5rloRGTSSdv6jmtd
5 changes: 0 additions & 5 deletions content/home/home.de.txt

This file was deleted.

5 changes: 5 additions & 0 deletions content/home/home.en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Title: Home

----

Uuid: OZY1JtRhNfCnKX5H
1 change: 0 additions & 1 deletion content/search/search.de.txt

This file was deleted.

1 change: 1 addition & 0 deletions content/search/search.en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Title: Search
14 changes: 0 additions & 14 deletions site/languages/de.php

This file was deleted.

14 changes: 14 additions & 0 deletions site/languages/en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

return [
'code' => 'en',
'default' => true,
'direction' => 'ltr',
'locale' => 'en',
'name' => 'English',
'url' => '/',
'translations' => [
'relatedArticles' => 'Related articles',
'readMore' => 'Read more',
],
];
2 changes: 1 addition & 1 deletion site/templates/article.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<?= snippet('blocks') ?>
</main>

<?php if (! empty($relatedArticles)): ?>
<?php if ($relatedArticles->isNotEmpty()): ?>
<div class="md:grid md:grid-cols-2 lg:grid-cols-3 gap-x-m max-w-default mx-auto px-m mb-xxxl">
<?php snippet('components/text', [
'text' => t('relatedArticles'),
Expand Down
3 changes: 2 additions & 1 deletion site/templates/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'title' => $page->title(),
'image' => $page->cover()->toFile(),
]) ?>

<?= snippet('blocks') ?>
</main>

<?= snippet('blocks') ?>

0 comments on commit d0cf0bf

Please sign in to comment.