{"id":19337490,"url":"https://github.com/berlinmagic/magic_locales","last_synced_at":"2026-05-13T01:35:34.267Z","repository":{"id":29328038,"uuid":"32861632","full_name":"berlinmagic/magic_locales","owner":"berlinmagic","description":"Rails gem to help with common european locales.","archived":false,"fork":false,"pushed_at":"2016-01-04T15:17:58.000Z","size":507,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-22T01:43:00.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berlinmagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-25T11:58:28.000Z","updated_at":"2015-03-31T14:19:55.000Z","dependencies_parsed_at":"2022-07-19T04:17:13.550Z","dependency_job_id":null,"html_url":"https://github.com/berlinmagic/magic_locales","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/berlinmagic/magic_locales","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berlinmagic%2Fmagic_locales","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berlinmagic%2Fmagic_locales/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berlinmagic%2Fmagic_locales/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berlinmagic%2Fmagic_locales/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berlinmagic","download_url":"https://codeload.github.com/berlinmagic/magic_locales/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berlinmagic%2Fmagic_locales/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32964052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T03:14:29.618Z","updated_at":"2026-05-13T01:35:34.246Z","avatar_url":"https://github.com/berlinmagic.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MagicLocales\n\nRails gem to help with translations and locale changing. \nUses simple locale style like **`:en`** or **`:de`** .. more complex (**`en-US`**) style may follow. \n\nThe gem includes a seed file with most common european locales. \n\n\n## Usage\n- add gem to your gemfile \n```ruby\n  gem \"magic_locales\"\n```\n\n- run install generator\n```ruby\n  rails g magic_locales:install\n```\n\n- check new migration and migrate your database\n```ruby\n  bundle exec rake db:migrate\n```\n\n\n### Controller-Helper\n- in your application controller: \n```ruby\n\n  include MagicLocaleHelper\n\n  before_action :get_user_language\n\n```\n\n`include MagicLocaleHelper` loads in the helper and `before_action :get_user_language` checks user language *(via db-field or accept-language)* .. now you can access your users `@accept_language`.\n\n\n\n#### Features\n\n- Seed-file for this languages\n```ruby\n  bg, cs, da, nl, en, fi, fr, de, el, hr, hu, it, pl, pt, ru, es, sv, uk\n```\n- each translated in:\n```ruby\n  cs, de, en, es, fr, it, pl, ru\n```\n- locale switch helper (only visible, if more than 1 locale is live)\n```ruby\n  \u003c%= render \"magic_locales/locale_switch\" %\u003e\n```\n- helper to show fields for each active language (globalize helper)\n```ruby\n  \u003c%= f.globalize_fields_for lc do |g| %\u003e\n    # ..\n  \u003c% end %\u003e\n```\n\n#### License\nThis project rocks and uses MIT-LICENSE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberlinmagic%2Fmagic_locales","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberlinmagic%2Fmagic_locales","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberlinmagic%2Fmagic_locales/lists"}