Skip to content

Commit a284ce1

Browse files
Test translations
1 parent de2b130 commit a284ce1

File tree

6 files changed

+92
-2
lines changed

6 files changed

+92
-2
lines changed

web/astro.config.mjs

+19
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ import mtasaStarlightThemePlugin from '@multitheftauto/starlight-theme-mtasa';
55

66
// https://astro.build/config
77
export default defineConfig({
8+
i18n: {
9+
locales: ["en", "es", "fr"],
10+
defaultLocale: "en",
11+
routing: {
12+
prefixDefaultLocale: false,
13+
},
14+
fallback: {
15+
"es": "en",
16+
"fr": "en",
17+
}
18+
},
819
integrations: [
920
starlight({
1021
plugins: [
@@ -25,9 +36,17 @@ export default defineConfig({
2536
sidebar: [
2637
{
2738
label: 'Start here',
39+
translations: {
40+
es: 'Empeza aquí',
41+
fr: 'Commence ici',
42+
},
2843
items: [
2944
{
3045
label: 'Introduction', link: 'Introduction',
46+
translations: {
47+
es: 'Introducción',
48+
fr: 'Introduction',
49+
},
3150
},
3251
]
3352
},

web/src/pages/es/Introduction.mdx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
2+
3+
<StarlightPage frontmatter={{
4+
template: 'doc',
5+
title: 'Introducción',
6+
tableOfContents: false,
7+
}}>
8+
Hola
9+
</StarlightPage>

web/src/pages/es/index.mdx

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
2+
3+
<StarlightPage frontmatter={{
4+
template: 'splash',
5+
title: 'Bienvenido',
6+
description: 'El nuevo wiki de Multi Theft Auto',
7+
hero: {
8+
tagline: 'El nuevo wiki de Multi Theft Auto está actualmente en construcción!',
9+
actions: [
10+
{
11+
link: 'Introduction',
12+
text: 'Empieza aquí',
13+
icon: 'right-arrow'
14+
},
15+
{
16+
link: 'https://github.com/multitheftauto/wiki.multitheftauto.com',
17+
text: 'Contribuye en GitHub',
18+
icon: 'github',
19+
variant: 'minimal',
20+
attrs: {
21+
target: '_blank',
22+
rel: 'noopener'
23+
}
24+
}
25+
]
26+
}
27+
}} />

web/src/pages/fr/Introduction.mdx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
2+
3+
<StarlightPage frontmatter={{
4+
template: 'doc',
5+
title: 'Introduction',
6+
tableOfContents: false,
7+
}}>
8+
Bonjour
9+
</StarlightPage>

web/src/pages/fr/index.mdx

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
2+
3+
<StarlightPage frontmatter={{
4+
template: 'splash',
5+
title: 'Bienvenue',
6+
description: 'Le nouveau wiki de Multi Theft Auto',
7+
hero: {
8+
tagline: 'Le nouveau wiki de Multi Theft Auto est actuellement en construction !',
9+
actions: [
10+
{
11+
link: 'Introduction',
12+
text: 'Commence Ici',
13+
icon: 'right-arrow'
14+
},
15+
{
16+
link: 'https://github.com/multitheftauto/wiki.multitheftauto.com',
17+
text: 'Contribue sur GitHub',
18+
icon: 'github',
19+
variant: 'minimal',
20+
attrs: {
21+
target: '_blank',
22+
rel: 'noopener'
23+
}
24+
}
25+
]
26+
}
27+
}} />

web/src/pages/index.astro renamed to web/src/pages/index.mdx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
---
21
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3-
---
2+
43
<StarlightPage frontmatter={{
54
template: 'splash',
65
title: 'Welcome',

0 commit comments

Comments
 (0)