Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
AstroPaper fork adding internationalization (i18n), RTL support, and a language switcher to Astro blog themes.
AstroPaper I18n is a fork of the AstroPaper blog theme that adds full internationalization (i18n) support, including right-to-left (RTL) layout direction, to Astro-based static sites.
AstroPaper I18n is a static blog theme for Astro, forked from the popular AstroPaper theme by satnaing and maintained by yousef8. It takes markdown content organized by locale folders and translation files, and produces a multilingual static blog with localized UI, sitemaps, RSS feeds, and OG images. The theme runs on the Astro framework and uses Astro's built-in i18n routing.
Unlike the original AstroPaper, this fork does not modify the theme's UI; it only layers i18n features on top. The author, a native Arabic speaker, specifically ensured that the i18n integration supports RTL languages such as Arabic and Persian. The project aims to stay synchronized with the upstream AstroPaper repository.
AstroPaper I18n adds i18n and RTL support while inheriting everything from the original AstroPaper theme. Below are the concrete features documented in the repository.
direction option accepting rtl, ltr, or auto.src/i18n/locales are TypeScript modules typed as I18nStrings, giving compile-time checks for missing or misspelled translation keys.src/i18n/config.ts.@astrojs/sitemap to generate sitemaps with i18n support.@astrojs/rss to produce i18n-aware RSS feeds.npm test, npm run test:watch, or npm run coverage for test reports.src/content/blog, and the about page has its own content collection with files named about.<locale>.md.AstroPaper I18n is aimed at anyone who wants a lightweight, SEO-friendly blog that serves content in multiple languages without abandoning the AstroPaper design.
src/content/blog, and the theme handles localized URLs, dates, and numbers.direction: "rtl" and langTag: "ar-EG" for your locale to get a full right-to-left blog with localized dates and numbers.en.ts and es.ts translation files, then organizing posts under src/content/blog/en and src/content/blog/es.Adding a new language follows a four-step workflow documented in the README.
es.ts for Spanish) in src/i18n/locales, exporting an I18nStrings object.src/i18n/config.ts with its name, messages, BCP-47 language tag, layout direction, and Google font used for OG images.about.<locale>.md in src/content/about.src/content/blog, then restart the dev server.Pros:
Cons:
Yes. Each locale profile accepts a direction value of rtl, ltr, or auto, and the UI is designed to look consistent in both directions. The author built the fork specifically with native Arabic support and it also works for Persian.
Create a TypeScript file named with the locale key in src/i18n/locales, define its profile in src/i18n/config.ts, add an about page named about.<locale>.md, and put blog posts under src/content/blog/<locale>. Restart the dev server to see the changes.
Yes. Translation files are typed as I18nStrings from @i18n/types, so missing or misspelled keys are caught at build time. The theme also includes Vitest unit tests for i18n configurations and utilities.
Yes. The README explicitly states that the fork does not modify the original theme's UI; it solely adds internationalization. It also includes all features of the original AstroPaper theme.
The README lists two known issues: screen reader mode styling is broken and needs fixes, and OG image generation for RTL languages has layout problems because satori does not support RTL. Both are open for contributions.
