Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Minimalistic Astro blog template with robust multilingual (i18n) support.
AstroLingo is a minimalistic Astro blog template whose core function is adding robust multilingual (i18n) support to a personal blog, portfolio, or simple website.
AstroLingo is an open-source starter theme for Astro, created by Jose Bolanos (GitHub user jbolns) and released under the MIT license. It takes content written as Markdown and MDX files organized into per-language folders and generates a static website with localized URLs, blog listings, tag pages, and pagination. The template is built on Astro's minimalistic blog template, which itself was based on Bear Blog. The default project structure includes src/content for collections, src/pages for routes, src/i18n for language configuration, and src/components and src/layouts for UI. Running npm run dev starts a local server at localhost:4321.
src/content/blog/en and src/content/blog/es) and rendered at URLs such as /blog/[lang]/[slug].getStaticPaths(), and tags can be different across languages.src/i18n/ui.ts defines languages, the default language, collection names, and navigation links; src/i18n/routes.ts maps slug equivalences between languages; src/i18n/utils.ts contains language-bar utilities..md or .mdx files with frontmatter; hero images go in the public directory to avoid duplication.src/styles/global.css file that can be replaced with a CSS framework like Tailwind CSS; the author uses Tailwind and Three.js on his personal site.src/pages/blog; Astro's internationalization options let you prefix or hide the default locale in URLs.AstroLingo is for bloggers who publish in two or more languages and want per-language URLs, tag pages, and pagination without building the logic themselves. It is also for portfolio owners who need top-level pages in each language, with the ability to use different filenames per language (for example, about.astro in English and acerca.astro in Spanish) and map them in routes.ts. Developers who want a starting point for a multilingual Astro site can extend it with Tailwind, add new content collections, or modify the language bar behavior via src/i18n/utils.ts.
routes.ts to define equivalences such as en/about to es/acerca./[collection]/[lang]/[entry].AstroLingo relies on Astro's content collections and static page generation. Folders under src/content define collections, and subfolders per language hold Markdown/MDX files. Pages in src/pages call getCollection(), flatMap(), and map() to generate localized routes, while getStaticPaths() creates the pagination and tag pages. The language bar automatically redirects to the current slug in another language; if slugs differ (for example, about vs acerca), you add the equivalence to src/i18n/routes.ts.
Yes, AstroLingo is published under a standard MIT license, so you can use, modify, and distribute it freely.
AstroLingo supports any number of languages that you define in src/i18n/ui.ts. There is no hard-coded language list; you add a language by creating a folder with its language code in src/pages and src/content.
No. Entries in each language folder will appear on their own language blog whether or not they have translations. If a language has no entry for a given page, you can redirect to the home or blog page in src/i18n/routes.ts to avoid a Page Not Found error.
Yes. Astro's internationalization configuration lets you prefix the default locale or hide it entirely from URLs. The author notes that changing this behavior will require revisiting the files in src/i18n. The default structure puts language after the collection name (for example, example.com/blog/en).
The author states that AstroLingo is probably overkill if your website does not need multiple languages. For a single-language blog, a simpler Astro template would be lighter.
