Multilingual support based on Astro's built-in i18n routing
AstroPaperI18n — Astro Blog Template
By yousef8
AstroPaperI18n is an internationalized fork of the AstroPaper blog theme that adds multilingual and RTL support based on Astro's built-in i18n routing.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 3
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Full RTL support with consistent UI in LTR and RTL
Localization of UI strings, numbers, and dates, plus a language switcher
Type-safe i18n integration using TypeScript
i18n support for sitemap, RSS, and OG image generation
Unit tests for i18n configuration and utilities using Vitest
Template Details
AstroPaperI18n is a fork of the AstroPaper theme maintained by yousef8, aiming to add internationalization capabilities while preserving the original theme's UI. It uses Astro's i18n routing to implement multilingual pages. As the author is a native Arabic speaker, the fork specifically handles the interface direction for RTL languages such as Arabic and Persian, keeping the UI consistent in both LTR and RTL modes.
Functionally, the fork provides localized translations for UI strings, numbers, and dates, a language switcher, accessibility-related translations, and a type-safe i18n integration based on TypeScript. It also adds i18n support for sitemap, RSS, and OG image generation. Note that satori, which powers OG image generation, does not support RTL languages, so RTL OG images will have layout issues. Route translations are still in the planning stage.
In terms of usage, you need to create a translation file for each language under src/i18n/locales, define language configurations in src/i18n/config.ts (name, translation, BCP-47 language tag, layout direction, Google font name), change the about page to a separate content collection, and place blog posts in directories named after language keys under src/content/blog; otherwise they will not be included in the site. The project includes Vitest unit tests covering i18n configuration and utilities, but tests for src/utils and src/config.ts are not yet complete. Known issues include broken styles in screen reader mode.
Is it right for your project?
Use Cases
- Adding multilingual versions to an AstroPaper blog
- Blogs that need RTL language support such as Arabic or Persian
- Organizing blog posts and about page content by language
- Sites that need multilingual sitemap, RSS, and OG images
Suitable For
- Developers using Astro who want to build a multilingual blog based on AstroPaper
- Arabic or Persian content sites that require RTL language support
- Users who accept manually extending languages through translation files and language configuration
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Create translation files under src/i18n/locales named <locale_key>.ts and export an I18nStrings-typed variable
- 2
Configure language name, translation, BCP-47 language tag, layout direction, and Google font name in localeToProfile in src/i18n/config.ts
- 3
The about page uses a separate content collection, with files named about.<locale_key>.md
- 4
Blog posts must be placed in directories named after language keys under src/content/blog; posts outside language directories will not be included in the site
- 5
After modifying language configuration, you may need to restart the development server to see changes
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license from the public repository; the free scope is the code of this version and does not imply that external services or third-party assets are free.
Must comply with when using
- You are allowed to use, modify, commercialize, and distribute the code of this version for free.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
- satori, which powers OG image generation, does not support RTL languages, so OG images for RTL languages such as Arabic and Persian will have layout issues and cannot render properly.
- Blog posts must be placed in directories named after language keys under src/content/blog; posts outside language directories will not be included in the site.
- After modifying language configuration, you may need to restart the development server to see changes.
- Route translations are not yet implemented and remain in the planning stage; the current version does not provide this capability.
- Styles in screen reader mode are currently broken and need fixing; the interface does not display properly in that scenario.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
Note: satori does not support RTL languages, causing layout issues for RTL OG images.
Original README
Any blog outside locale folder will not be considered by the site.
Original README
**Note:** you may need to restart the dev server to see the changes.
Original README
- [ ] Route translations.
Original README
https://github.com/yousef8/AstroPaperI18n/blob/main/LICENSEhttps://github.com/yousef8/AstroPaperI18n/blob/main/README.md- [ ] Styling in screen reader mode is currently broken and requires fixes.
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-12. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 77 / 100
- Technologies
- Astro
- Website type
- Blog
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2025-03-02
- Screenshot last checked
- 2026-10-12
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Astro as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Review declaration: [email protected] · 2026-10-13
Inspect the recorded source material
SHA-256: 92858ecf929a104c848c11c23eb73c63e194f23a04ed6a43f5a9fc1257d7e94c
2026-10-12T18:35:26.285Z
Source file / repository# AstroPaper with I18n
🌍 [اقرأنى بالعربية](README.ar.md)
<div align='center'>

</div>
[](http://commitizen.github.io/cz-cli/)  
This repository is a fork of the [AstroPaper](https://github.com/satnaing/astro-paper) theme, enhanced to support internationalization (i18n).
The fork Builds upon the original AstroPaper theme to integrate i18n functionality.
I18n integration is implemented using [Astorjs i18n routing](https://docs.astro.build/en/guides/internationalization/)
As I'm a native Arabic speaker, I made sure the i18n integration supports RTL languages (etc Arabic, Persian,...).
If god wills, this fork will maintain synchronization with the original [AstroPaper](https://github.com/satnaing/astro-paper) theme.
This Fork does not modify the original theme’s UI; it solely adds i18n support.
## Table Of Contents
- [🔥 Features](#-features)
- [UI Enhancements](#ui-enhancements)
- [i18n Features](#i18n-features)
- [🧪 Testing](#-testing)
- [Lighthouse Score](#lighthouse-score)
- [📖 How To Use](#-how-to-use)
- [🛠️ Configuration](#%EF%B8%8F-configuration)
- [🔧 Site Configurations](#-site-configurations)
- [🌐 Locale Configurations](#-locale-configurations)
- [🧞 Commands](#-commands)
- [🚧 Known Issues](#-known-issues)
## 🔥 Features
This project includes all the features of the original [AstroPaper](https://github.com/satnaing/astro-paper) theme, with the following enhancements:
### UI Enhancements
- [x] **Direction Agnostic:**
- [x] Full RTL support.
- [x] Consistent UI for both `LTR` and `RTL` directions.
### i18n Features
- [x] UI translations, including numbers and dates.
- [x] Language switcher.
- [x] Accessibility-related translations.
- [x] Type-safe i18n integration using TypeScript.
- [x] Sitemaps with i18n support ([`@astrojs/sitemap`](https://docs.astro.build/en/guides/integrations-guide/sitemap/)).
- [x] OG image generation with i18n support
- Note: satori does not support RTL languages, causing layout issues for RTL OG images.
- [x] RSS Feeds with i18n support ([`@astrojs/rss`](https://docs.astro.build/en/guides/rss/)).
- [ ] 📋 **Planned:**
- [ ] Route translations.
### 🧪 Testing
- [x] Unit testing with [Vitest](https://vitest.dev/)
- [x] Unit testing for i18n configurations and utilities
- [ ] Unit testing for [src/utils](/src/utils)
- [ ] Unit testing for [src/config.ts](/src/config.ts)
## Lighthouse Score
Click to view full report
<p align="center">
<a href="https://pagespeed.web.dev/analysis/https-yousef8-github-io-AstroPaperI18n-ar/d2cqwqovpv?form_factor=desktop">
<img width="710" alt="AstroPaper I18n Lighthouse Score" src="AstroPaper-lighthouse-score.svg">
<a>
</p>
## 📖 How To Use
### 1- Create translations file
Go to [src/i18n/locales](/src/i18n/locales) and create a file for your locale (e.g. es, ja, etc..), it should be named as `<locale_key>.ts` (e.g. es.ts, ja.ts, etc..).
Export a variable of `I18nStrings` type from `@i18n/types` with all the translations as key value pairs.
Take a look at the type at [/src/i18n/types.ts](/src/i18n/types.ts) and example file [/src/i18n/locales/ar.ts](/src/i18n/locales/ar.ts)
### 2- Define locale configuration
Go to [src/i18n/config.ts](/src/i18n/config.ts) and define a locale profile for your locale inside the configuration object `localeToProfile`.
Locale configuration is used to define the name of the locale, the translations, the language tag, the UI layout direction, and the Google font name.
Create a locale key which must be in all lowercase and complient with BCP-47 names. (eg. ar, en, es, ja, etc..), it's value is an object with the following keys:
- Assign a name to the `name` key in your locale profile, it will be used in the language picker.
- Assign translations file you created in step 1 to the `messages` key in your locale profile.
- Language tag must be in BCP47 name compliant, it's used to localize date and time in original AstroPaper theme, but it's **scope was expanded to localize all the numbers too**. (eg. en-US, ar-EG, es-ES, ja-JP, etc..)
- Google font name is used only in [OG images](https://magefan.com/blog/open-graph-meta-tags).
- set the `default` key to `true` if you want to set it, if no locale is set as default, the first locale in the object is used as the default.
- set the `direction` key to one of supported values `rtl | ltr | auto` corresponds to html `dir` tag directives values
**Note:** you may need to restart the dev server to see the changes.
**Note:** [satori](https://github.com/vercel/satori) does not support RTL languages, causing layout issues for RTL [OG images](https://magefan.com/blog/open-graph-meta-tags).
### 3- Add about page
The about page now has it's own [content collection](https://docs.astro.build/en/guides/content-collections/) because this theme supports i18n and you will likely need about page content in multiple locales.
Go to [src/content/about](/src/content/about) and create a file for your locale, it should be named as `about.<locale_key>.md` (e.g. about.en.md, about.es.md, etc..).
Same frontmatter keys as in original AstroPaper theme are supported `title` and `description` for the page title and description.
### 4- Add your content
Under [src/conent/blog](/src/content/blog) create a folder with your locale key (e.g. es, ja, etc..) as it's name and add your content in markdown format.
Any blog outside locale folder will not be considered by the site.
That's it, you're done 🎈🎉 🥳!
See [AstroPaper Docs](https://github.com/satnaing/astro-paper?tab=readme-ov-file#-documentation) for more info as this project builds upon it while to only support i18n, but everything else should be the same.
## 🛠️ Configuration
The same way to [use and configure AstroTheme](https://github.com/satnaing/astro-paper?tab=readme-ov-file#-project-structure), but with some changes.
### 🔧 Site Configurations
`SITE.title` and `SITE.desc` configuration has been replaced with `site.title` and `site.desc` translation, which is now used across whole site.
```diff
// src/config.ts
export const SITE: Site = {
//...
- title: "AstroPaper I18n",
- desc: "A fork of AstroPaper theme with support for I18n",
//...
};
```
```diff
// src/i18n/types.ts
export interface I18nStrings {
+ "site.title": string;
+ "site.desc": string;
// ... other translations
```
### 🌐 Locale Configurations
Locale configuration has been moved from `src/config.ts` to a dedicated file for better organization.
```diff
// src/config.ts
-export const LOCALE = {
- lang: "en", // html lang code. Set this empty and default will be "en"
- langTag: ["en-EN"], // BCP 47 Language Tags. Set this empty [] to use the environment default
-} as const;
export const LOGO_IMAGE = {
```
Instead Locale configuration is now handled in `src/i18n/config.ts`:
```ts
// src/i18n/config.ts
export const localeToProfile = {
// local key must be all lowercase and complaint with BCP-47
ar: {
name: "العربية", // Name presented in language picker
messages: ARLocale, // Locale translations
langTag: "ar-EG", // BCP 47 Language Tag (used for dates, numbers, and sitemap)
direction: "rtl", // UI layout direction
googleFontName: "Cairo", // For OG image generation, font must support 400 and 700 weights, replace spaces with '+'
},
en: {
name: "English",
messages: ENLocale,
langTag: "en-US",
direction: "ltr",
googleFontName: "IBM+Plex+Mono",
default: true,
},
} satisfies Record<string, LocaleProfile>;
```
## 🧞 Commands
Same [commands as in original theme](https://github.com/satnaing/astro-paper/tree/main?tab=readme-ov-file#-commands) with addition to
| Command | Action |
| :------------------- | :------------------------------------------------------------------------------------------ |
| `npm test` | Run all unit tests once and exit [learn more](https://vitest.dev/guide/cli.html#vitest-run) |
| `npm run test:watch` | Run unit tests in watch mode [learn more](https://vitest.dev/guide/cli.html#vitest-watch) |
| `npm run coverage` | Generate unit testing coverage report [learn more](https://vitest.dev/guide/coverage.html) |
## 🚧 Known Issues
- [ ] Styling in screen reader mode is currently broken and requires fixes.
- Contributions are welcome!
Explore similar templates
Compare previews and descriptions within the same stack and category.

astrowind
AstroWind is a free, open-source Astro starter theme using Astro and Tailwind CSS, released under the MIT license.
Astro · Blog

astro-paper
AstroPaper is a minimal, responsive, accessible, and SEO-friendly Astro blog theme. Articles are stored as Markdown/MDX in src/content/posts/, with subdirectories affecting URLs.
Astro · Blog

fuwari
Fuwari is a static blog template built with Astro and Tailwind CSS for personal blogs. It manages posts as Markdown files in src/content/posts/, with frontmatter for title, date, description, cover, tags, categories, draft status, and language.
Astro · Blog

Firefly
Firefly is a clean personal blog theme forked from Astro and Fuwari, offering four background modes, single/double sidebar and list/grid layouts, Pagefind client-side full-text search, and a six-language UI.
Astro · Blog

astro-theme-cactus
Astro Cactus is an Astro-based blog and portfolio theme that uses Markdown/MDX content collections to manage posts, notes, and tags, with frontmatter type-checked by a schema.
Astro · Portfolio

astrofy
Astrofy is a free and open-source personal portfolio website template built with Astro and TailwindCSS, with built-in blog, CV timeline, project showcase, store, and RSS feed modules.
Astro · Portfolio
