Ruby on Rails Internationalization (i18n) Tutorial: YAML, Plurals & PO Files
The complete Rails 8 picture, including the three gaps the framework leaves open: no extractor, no stale-translation tracking, and a format no translator has tooling for. Covers how the I18n backend and load path actually resolve a key and why the default glob is one level deep — the reason a whole locale subdirectory can vanish without a warning; configuring available_locales, hyphenated BCP 47 codes and region fallbacks; YAML files with %{name} interpolation, reserved key names that raise, lazy lookup in views, partials, controllers and mailers, and the _html suffix that escapes interpolated values so you never reach for html_safe; around_action with I18n.with_locale and why a before_action assignment leaks the locale into the next request on Puma; model names, attribute labels and the five-level validation error lookup; the pluralization bug every Rails app ships by default, where the Simple backend applies the English rule to Russian and Arabic and nothing errors; localized dates and currency and why locale is not currency; raise_on_missing_translations, why fallbacks make it blind, and i18n-tasks with the ignore_unused block people skip and regret; whose locale a mailer uses when ActiveJob captured the sender's. Then a full rake task that exports YAML to gettext PO with the key in msgctxt and English in msgid, asks the backend for the target locale's CLDR plural categories, and imports the finished file back — plus msgfmt --check-format as the placeholder gate, a comparison with gettext_i18n_rails as a native backend, a GitHub Actions workflow, and a twelve-row symptom-to-fix table.