Modern gettext for .NET — plural-aware, PO-friendly, and designed for code-driven localization.
Ponyglot is a lightweight, production-ready localization library for .NET, built around the gettext ecosystem. It focuses on correct plural handling, clean developer ergonomics, and direct use of PO files, without legacy constraints.
Developed by Soft-Unicorn 🦄.
Localization is easy to get almost right — until plurals and real languages enter the picture.
Ponyglot exists because:
- plural rules are language-specific, not
if (n == 1) - gettext already solved hard linguistic problems
- modern .NET apps deserve a code-first, type-safe API
- PO files are still the best interchange format for translators
Ponyglot embraces gettext without inheriting its historical baggage.
- ✅ Gettext-compatible concepts (
msgid,msgctxt, plurals) - ✅ First-class plural handling (including zero forms)
- ✅ Direct runtime support for
.pofiles (no.morequired) - ✅ Stable message identifiers (safe refactoring)
- ✅ Translator-friendly comments and context
- ✅ Designed for modern .NET (async-safe, culture-aware)
Ponyglot is designed to be:
- Correct — plural forms follow real linguistic rules
- Predictable — no hidden magic, no runtime heuristics
- Translator-friendly — works with existing gettext tools
- Developer-friendly — readable, expressive code
Ponyglot intentionally does not try to be:
- a UI framework
- a key/value JSON-based i18n system
- a full gettext reimplementation (CLI tools stay external)
- a magic auto-translation solution
Simple message
var text = Tr.T("Save");Plural-aware message
var text = Tr.T(count, "One file found: {1}", "{0} files found: {1}", count, fileList);Ponyglot works directly with PO files at runtime:
- no
.mocompilation step required - translations are loaded into memory
- ideal for debugging and hot reload scenarios
Standard gettext tools such as Poedit, Weblate, or Crowdin are fully compatible.
🚧 Early development / experimental
The API is to be considered unstable and subject to change. Feedback and discussion are welcome.
MIT
Ponyglot is developed and maintained by Soft-Unicorn. Ponyglot is a trademark of Soft-Unicorn. Built with care for correctness, clarity, and long-term maintainability.