i18n start + css start
This commit is contained in:
parent
688d794dc7
commit
15b825bd5d
40 changed files with 1062 additions and 33 deletions
7
src/pages/articles/i18n/en.json
Normal file
7
src/pages/articles/i18n/en.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"{route}": "blog",
|
||||
"pageName": "Blog",
|
||||
"pageName{cool:'yes'}": "Blog cools",
|
||||
"pageName{cool:'no'}": "Blog nuls",
|
||||
"trad": "hello english"
|
||||
}
|
6
src/pages/articles/i18n/fr.json
Normal file
6
src/pages/articles/i18n/fr.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pageName": "Articles",
|
||||
"pageName{cool:'yes'}": "Articles cools",
|
||||
"pageName{cool:'no'}": "Articles nuls",
|
||||
"trad": "slt sava"
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
import { t, l } from "astro-i18n";
|
||||
|
||||
import "../../styles/style.css";
|
||||
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
|
@ -6,11 +8,15 @@ import ContentPost from "../../components/ContentPost.astro";
|
|||
|
||||
const allPosts = await Astro.glob("./*.mdx");
|
||||
|
||||
const pageTitle = "Articles";
|
||||
console.log(t("index.articles.pageName", { cool: "yes" }));
|
||||
|
||||
const pageTitle = t("index.articles.pageName");
|
||||
const titleColor = "hotpink";
|
||||
---
|
||||
|
||||
<BaseLayout pageTitle={pageTitle} titleColor={titleColor}>
|
||||
<h2>{t("index.articles.pageName", { cool: "yes" }, "fr")}</h2>
|
||||
<p>{t("index.articles.trad")}</p>
|
||||
<ul>
|
||||
{
|
||||
allPosts.map((post) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue