A Ruby gem for translating Rails application routes into multiple languages using a simple dictionary format.
RouteTranslator is a Ruby gem that adds multilingual route support to Rails applications. It translates URL segments like `/cars` into language-specific versions such as `/es/coches` or `/fr/voitures` using Rails' I18n system. The gem solves the problem of creating SEO-friendly, localized URLs without manually defining duplicate routes for each language.
Rails developers building multilingual web applications that require translated URLs for better user experience and SEO. It's particularly useful for teams targeting international audiences where route localization is essential.
Developers choose RouteTranslator because it integrates seamlessly with Rails routing and I18n, uses a simple dictionary-based configuration, and supports advanced features like host-based locale detection and namespace translation without complex setup.
Translate your rails app route to various languages without the hassle
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses standard Rails locale files under a 'routes' key, making translation management consistent with other app content and reducing setup complexity.
Allows wrapping specific route groups in 'localized' blocks, so only selected routes are translated, avoiding unnecessary overhead for untranslated routes.
Supports setting locale based on request domain with wildcard patterns, enabling multi-domain applications to dynamically hide or show locales without manual routing.
Offers various settings like forcing locale visibility, disabling fallbacks, and custom locale segment processing, allowing fine-tuned adaptation to project needs.
Does not handle pluralization or grammatical inflections automatically; developers must use workarounds like 'path_names' in resources, adding manual effort.
Requires extra setup and specific Devise versions (4.9.4+) to handle locale correctly in authentication flash messages, which can lead to subtle bugs if misconfigured.
Must use 'around_action' instead of 'before_action' for locale setting to avoid thread-related issues, a non-intuitive requirement that can confuse developers.