#i18n Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
JavaScript i18n Minimal Translator
A tiny internationalisation helper that loads a locale dictionary and resolves translation strings by dot-notation key. Supports variable interpolation via {{placeholder}} syntax. Falls back to the key itself when a translation is missing, keeping the UI readable during development. Swap the locale at runtime without a page reload.
PHP Number to Ordinal (1st, 2nd, 3rd)
Convert an integer to its English ordinal form ("1st", "2nd", "3rd", "11th", "22nd", "103rd"). Pure rule-based; no library needed.
PHP Format Money with Currency
Format an amount of cents as a localized currency string using NumberFormatter from intl. Falls back to a basic sprintf if intl isn't available.
PHP Pluralize / Singularize (English basics)
A pragmatic rule-based English pluralizer covering the common cases (s, es, ies, irregular nouns). Not perfect, but good enough for UI labels like "1 item" / "3 items".
TypeScript Format Relative Time ("3 days ago")
Use the built-in Intl.RelativeTimeFormat to render "3 days ago" / "in 5 hours". Localized for free — pass any BCP 47 locale. No date library needed.
HTML RTL (Right-to-Left) Document
Set `dir="rtl"` on the root element for languages that read right-to-left (Arabic, Hebrew, Persian). The browser flips text alignment, scroll, and form controls automatically. Use `dir="auto"` to let user-generated text decide per-block.