feat: i18n support with English and Spanish locale switching#111
Merged
Conversation
Extract all UI strings to locale YAML files and ship English (en) and Spanish (es) translations. Add a session-backed locale switcher in the header that persists the user's choice across requests. Key changes: - config/locales/en.yml and es.yml with every label, flash message, table header, empty state, confirmation dialog, and sparkline tooltip - ApplicationController#with_locale around_action picks locale from params[:locale] → session → I18n.default_locale - SolidStackWeb.available_locales config (default [:en, :es]); switcher is hidden when only one locale is configured - Engine loads engine locale files ahead of the host app's - All 25 views, 12 controllers, and the helper updated to use t() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add i18n/locale switching to README feature list and available_locales config docs. Remove completed i18n item from ROADMAP v2.0 milestone. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config/locales/en.ymlandconfig/locales/es.yml), covering page titles, table headers, button labels, empty states, flash messages (with pluralization), and sparkline tooltipsconfig.available_localesconfiguration option (default[:en, :es]) so host apps can restrict or extend the available locales; additional locales can be added via the host app's ownconfig/locales/directoryI18n.with_localeinside anaround_actionfor thread-safe locale switching;?locale=URL param takes precedence over session, and the locale form preserves all other query params (filters, sort, pagination)Test plan
bundle exec rake— full suite (RuboCop + RSpec) passes with 100% coveragecd spec/dummy && bin/rails server) and verify dashboard renders in English by defaultconfig.available_locales = [:en]in dummy initializer; verify the language selector disappears🤖 Generated with Claude Code