Merge pull request #278 from nelsongutidev/feat/add-internationalization-docs

feat(docs): add internationalization and add spanish lang
This commit is contained in:
Laforge Thomas
2023-11-15 19:21:41 +01:00
committed by GitHub
11 changed files with 496 additions and 0 deletions

View File

@@ -1,6 +1,11 @@
import starlight from '@astrojs/starlight';
import { defineConfig } from 'astro/config';
export const locales = {
root: { label: 'English', lang: 'en' },
es: { label: 'Español', lang: 'es' },
};
// https://astro.build/config
export default defineConfig({
integrations: [
@@ -21,10 +26,16 @@ export default defineConfig({
{
label: 'Guides',
autogenerate: { directory: 'guides' },
translations: {
es: 'Guías',
},
},
{
label: 'Challenges',
autogenerate: { directory: 'challenges' },
translations: {
es: 'Desafíos',
},
},
],
head: [
@@ -52,6 +63,17 @@ export default defineConfig({
PageTitle: './src/components/PageTitle.astro',
MobileMenuFooter: './src/components/MobileMenuFooter.astro',
},
defaultLocale: 'root',
locales: {
root: {
label: 'English',
lang: 'en',
},
es: {
label: 'Español',
lang: 'es',
},
},
}),
],
});