Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suven/astro-po-i18n
Skeleton for translating astro with po-files
https://github.com/suven/astro-po-i18n
Last synced: about 1 month ago
JSON representation
Skeleton for translating astro with po-files
- Host: GitHub
- URL: https://github.com/suven/astro-po-i18n
- Owner: Suven
- Created: 2024-05-04T16:44:29.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-04T18:17:19.000Z (8 months ago)
- Last Synced: 2024-10-29T01:01:46.589Z (about 2 months ago)
- Language: Astro
- Homepage: https://suven.github.io/astro-po-i18n/
- Size: 5.76 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Astro Starter Kit: PO based i18n SSG
This demo repository, which could function as your starting point or
inspiration on how to set up a seo-friendly multilanguage website, that
can be translated using well established gettext and po translation files.To learn more about this and how a workflow could look like, head over to the demo.
## Differences to Astros i18n
First things first: Astro itself comes with a recommendation about how to do proper
internalization. You can read about this at https://docs.astro.build/en/recipes/i18n/.In comparison, this one is more opiniated.
| astro i18n | this starter | better then astro? |
| ---------- | ------------ | ------------------ |
| allows you to configure i18n to have no path for the default language | just does it | 🤔 |
| has two variants for translating, you can either create seperate content-collections for each language (for example a `en/about.md` and `es/about.md`), or you can create yourself json-structures where you can translate keys. It also allows you to mix both. Either way, you create them by hand | follows the very old and established gettext-flow. You just use translation-keys in your astro-files and a translator-software like https://poedit.net/ will grab all keys from your source-code and make them translatable automaticly. Gettext also supports placeholders, proper pluralization and other stuff | 👍 |
| way, in which you are working with `md` and custom `tson`/`json` is not something every non-dev could handle. There is also no third party ecosystem for this approach | is using `.po`-files which are well established and known to all professional translators. In addition to that, Poedit allows you to **speed up translating with AI**. There are also platforms like https://crowdin.com/ where you can let others submit translations for your page. Companys like Discord, Microsoft, Valve and Github use that service for translating their apps | 👍 |
| has first class citizen build support to create / preview all translations at once. It also brings support for SSR | only enables you to preview one language at a time. You can build all languages at once cleanly into dist, but it will take longer then in astros variant, since we are building one language at a time | 👎 |