{"id":23765799,"url":"https://github.com/solidusio-contrib/solidus_globalize","last_synced_at":"2025-10-16T18:17:06.795Z","repository":{"id":1994864,"uuid":"45479580","full_name":"solidusio-contrib/solidus_globalize","owner":"solidusio-contrib","description":":earth_africa: Model data globalization for Solidus","archived":false,"fork":false,"pushed_at":"2023-05-23T12:32:20.000Z","size":6312,"stargazers_count":14,"open_issues_count":4,"forks_count":60,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-12-20T14:33:02.287Z","etag":null,"topics":["i18n","solidus","translation"],"latest_commit_sha":null,"homepage":"https://solidus.io","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solidusio-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-11-03T16:29:22.000Z","updated_at":"2024-11-03T21:02:21.000Z","dependencies_parsed_at":"2023-07-05T19:01:03.614Z","dependency_job_id":null,"html_url":"https://github.com/solidusio-contrib/solidus_globalize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_globalize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_globalize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_globalize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_globalize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidusio-contrib","download_url":"https://codeload.github.com/solidusio-contrib/solidus_globalize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232034913,"owners_count":18463363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["i18n","solidus","translation"],"created_at":"2024-12-31T23:17:53.102Z","updated_at":"2025-10-16T18:17:01.536Z","avatar_url":"https://github.com/solidusio-contrib.png","language":"Ruby","readme":"# Solidus Globalize\n\n[![CircleCI](https://circleci.com/gh/solidusio-contrib/solidus_globalize/tree/master.svg?style=svg)](https://circleci.com/gh/solidusio-contrib/solidus_globalize/tree/master)[![Code Climate](https://codeclimate.com/github/solidusio-contrib/solidus_globalize/badges/gpa.svg)](https://codeclimate.com/github/solidusio-contrib/solidus_globalize)\n\nThis is the globalization project for [Solidus][1].\n\n**NOTE:** If you just need to change the language of your store, and will only\nhave data in database in one language, then you don't need this gem,\nuse [solidus_i18n][8], which provides translations for static content (links,\nheaders etc).\n\nThis gem adds the **model data** translation support using the [Globalize][3] gem.\n[Read more](#model-translations)\n\nHappy translating!\n\n---\n\n## Installation\n\nAdd the following to your `Gemfile`:\n\n```ruby\ngem 'solidus_globalize', github: 'solidusio-contrib/solidus_globalize'\n```\n\nFor Ruby 3.x you have to force the usage of the friendly_id-globalize master version:\n\n```ruby\ngem 'friendly_id-globalize', github: 'norman/friendly_id-globalize', branch: \"master\"\ngem 'solidus_globalize', github: 'solidusio-contrib/solidus_globalize'\n```\n\n\nRun `bundle install`\n\nYou can use the generator to install migrations and append solidus_globalize assets to\nyour app solidus manifest file.\n\n    bin/rails g solidus_globalize:install\n\nThis will insert this line into your solidus manifest file\n(`vendor/assets/javascripts/spree/backend/all.js`):\n\n```js\n//= require spree/backend/solidus_globalize\n```\n\n---\n\n## Model Translations\n\nThis feature uses the [Globalize][3] gem to localize model data.\nSo far the following models are translatable:\n\n    Product, Promotion, OptionType, Taxonomy, Taxon, Property and ShippingMethod.\n\nStart your server and you should see a TRANSLATIONS link or a flag icon on each\nadmin section that supports this feature.\n\nTo enable adding translations in admin for a specific language you have to set\ninto an initializer:\n\n```ruby\nSolidusGlobalize::Config.supported_locales = [:en, :'pt-BR']\n```\n\n**PS 1.** The languages you add to this configuration need to be supported by\nyour store. This means that you need to have a transations file for them\ninto `/config/locales/` (eg. `/config/locales/pt-BR.yml`).\n\n**PS 2.** Please use symbols, not strings. e.g. `:'pt-BR'` not just `'pt-BR'`.\nOtherwise you may get unexpected errors\n\nOr if you prefer they're also available on the admin UI general settings section.\n\n*Every record needs to have a translation. If by any chance you remove `solidus_globalize`\nfrom your Gemfile, add some records and then add `solidus_globalize` gem back you might get\nerrors like ``undefined method for nilClass`` because Globalize will try fetch\ntranslations that do not exist.*\n\n---\n\n## Contributing\n\n[See corresponding guidelines][7]\n\n---\n\nCopyright (c) 2020 [Soldius][1] and other [contributors][5].\nReleased under the [New BSD License][6]\n\n[1]: https://solidus.io\n[3]: https://github.com/globalize/globalize\n[5]: https://github.com/solidusio-contrib/solidus_globalize/graphs/contributors\n[6]: https://github.com/solidusio-contrib/solidus_globalize/blob/master/LICENSE.md\n[7]: https://github.com/solidusio-contrib/solidus_globalize/blob/master/CONTRIBUTING.md\n[8]: https://github.com/solidusio-contrib/solidus_i18n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio-contrib%2Fsolidus_globalize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidusio-contrib%2Fsolidus_globalize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio-contrib%2Fsolidus_globalize/lists"}