Pluralization Rule Tester for Translators
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Pluralization Rule Tester for Translators scans the current page for text strings and translatable content, providing a floating panel to test pluralization rules for different languages. It extracts numeric values and count-based phrases from the page, then applies ICU MessageFormat pluralization rules with user-selectable language locales. A real-time preview shows how content changes with different plural forms (zero, one, two, few, many, other). Users can input custom strings and test pluralization patterns, view the correct plural form for any number, and compare translations side-by-side. Test results can be exported as JSON or text for localization teams, and strings that may not handle pluralization correctly are highlighted with suggestions for improvement.
WHERE IT RUNS
Works on any web page with translatable content, including localization dashboards, translation management systems, and multilingual applications. The script detects count-based phrases and text strings using pattern matching. It works best on pages with numeric values and countable nouns, and is useful for translators, localization engineers, and developers testing internationalization.
HOW TO USE
The panel displays a pluralization tester with locale selection, number input, and base word input. Select a language from the dropdown, enter a number and a base word, then click "Test" to see the plural form and an example. Quick test buttons (0, 1, 2, 3, 5, 10) allow rapid testing of common plural cases. Use "Detect from page" to automatically find count-based phrases on the current page and add them as test cases. The results table shows all test cases with locale, number, base word, plural form, and example. Export test results as JSON or text for sharing with localization teams or for documentation.
MECHANISM — ICU PLURALIZATION RULE ENGINE
The script implements a pluralization rule engine based on ICU MessageFormat standards. It includes plural rules for multiple languages including English (one/other), Spanish (one/other), French (one/other), German (one/other), Russian (zero/one/few/many/other), Polish (zero/one/few/many/other), Arabic (zero/one/two/few/many/other), and Chinese/Japanese/Korean (other only). Each language's rule function takes a number and returns the appropriate plural form. The engine supports the Unicode CLDR plural categories: zero, one, two, few, many, and other. The rule logic is based on standard CLDR plural rule formulas adapted for client-side testing.
THE PANEL
The floating panel is fully draggable and remembers its position per domain. Click the minimize button to collapse it to a small bubble, or press Escape to hide it. The panel automatically adjusts to different screen sizes and can be resized to show more content. All settings, including preferred locales and auto-detect preferences, are saved per domain. The panel integrates smoothly with any page layout using the BGPanel framework, maintaining clean separation from page content.
PLEASE NOTE
This script requires the free BotGentz extension to run. It does not send any data to external servers; all test cases and settings remain entirely local to your browser using GM_setValue. The script never reads password fields, hidden inputs, or file inputs. It stores only test data and configuration settings. The script detects text strings and count-based phrases from page content for testing purposes only and does not modify the page. Pluralization rules are based on CLDR standards but may not cover all language variations. Data persists across browser sessions and is isolated per browser profile.