Astartha Universal Slug Transliterator
Deterministic, unlimited transliteration for WordPress slugs. Converts non-Latin scripts to readable Latin without APIs, AI, or external services. Works for existing and new content.
by Lilith Zakharyan · github.com/astartha82/astartha-slug-transliterator
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/astartha82/astartha-slug-transliterator/archive/refs/heads/main.zipA WordPress plugin that automatically converts non-Latin post and taxonomy slugs into clean, URL-safe ASCII — for every language, with no limits on post count.
Features
- Automatic transliteration for new content — every new post, page, custom post type entry, tag, category, or custom taxonomy term gets a clean slug on save
- Bulk conversion of existing slugs — one button in Tools → Slug Transliterator
- No post-count limits — bulk processing runs in small AJAX batches, so it works on sites with thousands or hundreds of thousands of posts without hitting PHP time limits
- All post types & taxonomies — every registered public post type and public taxonomy is covered, including custom ones
- Universal language support — covers virtually all Unicode scripts:
- Cyrillic (Russian, Ukrainian, Bulgarian, Serbian, Kazakh …)
- Arabic, Hebrew, Persian
- Chinese, Japanese (Hiragana, Katakana), Korean (Hangul)
- Greek, Armenian, Georgian
- Thai, Devanagari, Bengali, Tamil, Telugu and dozens more
- Language-aware variants — applies locale-specific transliteration rules (Kyrgyz, Azerbaijani …) based on the WordPress site locale
- Zero configuration — install and activate; nothing else required
Other features
- Deterministic transliteration (not translation)
- No external services
- Unlimited
- Works for existing and new slugs
- Language-agnostic (script-based), results may differ from language-specific romanization
Known limitations
For scripts like Hebrew/Arabic/CJK, output is a mechanical romanization (no vowel reconstruction / no translation).
Installation
- Clone or download this repository into
wp-content/plugins/astartha-slug-transliterator/. - Activate the plugin in Plugins → Installed Plugins.
- New slugs are transliterated automatically from this point on.
- To process existing content go to Tools → Slug Transliterator and click Transliterate All Slugs.
Important: bulk transliteration permanently changes existing slugs. Back up your database first.
How it works
New content
The plugin hooks into WordPress's sanitize_title filter at priority 0. Before WordPress applies its own slug cleaning, any non-ASCII characters are converted to their ASCII equivalents using Unicode lookup tables.
Bulk processing (existing content)
The admin page triggers sequential AJAX requests, each processing a small batch of records (posts, then taxonomy terms). The browser keeps sending batches until all records are done, so there is no server-side timeout regardless of site size. A progress bar tracks the operation in real time.
Transliteration engine
The engine decodes UTF-8 byte sequences into Unicode codepoints, then looks each codepoint up in one of ~200 data files (data/xNN.php). Each file covers a 256-character Unicode block. Language-specific overrides are merged on top of the base mapping according to the site locale.
Character mapping data is derived from Sean M. Burke's Text::Unidecode CPAN module. The UTF-8 decoder is based on UtfNormal.php from MediaWiki.
File structure
astartha-slug-transliterator/
├── astartha-slug-transliterator.php Main plugin file, hooks, constants
├── includes/
│ ├── class-transliterator.php UTF-8 → ASCII conversion engine
│ └── class-admin.php Admin page + AJAX endpoints
├── assets/
│ └── js/
│ └── admin.js Progress-bar UI, batch orchestration
├── data/
│ └── x??.php Unicode block mapping tables (~200 files)
├── readme.txt WordPress.org plugin readme
└── LICENSE.txt
Requirements
| Minimum | |
|---|---|
| WordPress | 5.6 |
| PHP | 7.4 |
License
GPL-2.0-or-later — see LICENSE.txt.
Credits
- Text::Unidecode by Sean M. Burke — base transliteration tables
- UtfNormal.php from MediaWiki — UTF-8 decoding algorithm