mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
feat(docs): add internationalization and add spanish lang
This commit is contained in:
@@ -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: [
|
||||
@@ -51,6 +62,17 @@ export default defineConfig({
|
||||
TableOfContents: './src/components/TableOfContents.astro',
|
||||
PageTitle: './src/components/PageTitle.astro',
|
||||
},
|
||||
defaultLocale: 'root',
|
||||
locales: {
|
||||
root: {
|
||||
label: 'English',
|
||||
lang: 'en',
|
||||
},
|
||||
es: {
|
||||
label: 'Español',
|
||||
lang: 'es',
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user