Rails I18n library for ActiveRecord model translations, enabling multilingual content storage in separate tables.
Globalize is a Ruby gem that adds model translation capabilities to ActiveRecord in Ruby on Rails applications. It enables storing and retrieving translated versions of database record attributes, such as titles or content, in multiple languages. The library builds on Rails' I18n API to manage multilingual content through separate translation tables.
Rails developers building applications that require storing user-generated content in multiple languages, such as international blogs, e-commerce sites, or content management systems.
Developers choose Globalize for its tight integration with ActiveRecord and Rails conventions, making it a straightforward solution for model-level translations. It's a mature, feature-complete gem that handles translation tables, data migration, and fallbacks without requiring significant architectural changes.
Rails I18n de-facto standard library for ActiveRecord model/data translation.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly builds on Rails' I18n API and ActiveRecord conventions, allowing straightforward model translations with minimal configuration, as shown in the simple `translates` method usage.
Uses separate translation tables to store localized content, keeping the original model table uncluttered and making schema changes independent per locale.
Provides migration helpers like `create_translation_table!` with a `migrate_data` option to easily convert existing monolingual data to translations, reducing manual effort.
Configures fallbacks via I18n chains and offers `fallbacks_for_empty_translations` to handle empty or nil translations, improving user experience in incomplete locales.
The README explicitly states it's 'not very actively maintained,' risking compatibility issues with future Rails versions and slower bug fixes.
Requires careful use of `reversible` blocks in migrations and handling of not-null constraints, with known issues like PostgreSQL errors that need manual workarounds.
Separate translation tables necessitate joins for every query involving translated attributes, which can degrade performance in large-scale applications with many locales.
Only supports translation table strategy, unlike alternatives like Mobility that offer column-based, hstore, or jsonb storage, reducing flexibility for database optimizations.