{"id":16102366,"url":"https://github.com/sshaw/i18n-env-config","last_synced_at":"2026-05-05T07:31:12.796Z","repository":{"id":56877120,"uuid":"68483698","full_name":"sshaw/i18n-env-config","owner":"sshaw","description":"Set I18n.locale based on the environment variables that control the locale.","archived":false,"fork":false,"pushed_at":"2016-09-18T02:27:50.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-01T01:39:18.496Z","etag":null,"topics":["environment-variables","i18n","locale","ruby"],"latest_commit_sha":null,"homepage":"","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/sshaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-17T23:37:15.000Z","updated_at":"2016-09-17T23:47:30.000Z","dependencies_parsed_at":"2022-08-20T22:30:51.937Z","dependency_job_id":null,"html_url":"https://github.com/sshaw/i18n-env-config","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sshaw/i18n-env-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fi18n-env-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fi18n-env-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fi18n-env-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fi18n-env-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshaw","download_url":"https://codeload.github.com/sshaw/i18n-env-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Fi18n-env-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32640533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["environment-variables","i18n","locale","ruby"],"created_at":"2024-10-09T18:53:39.944Z","updated_at":"2026-05-05T07:31:12.781Z","avatar_url":"https://github.com/sshaw.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# I18n::Env::Config\n\n[![Build Status](https://secure.travis-ci.org/sshaw/i18n-env-config.svg)](https://secure.travis-ci.org/sshaw/i18n-env-config)\n\nSet `I18n.locale` based on the environment variables that control the locale.\n\nThis is for Desktop applications only.\nFor web application see [http_accept_languge](https://github.com/iain/http_accept_language) or [http-accept](https://github.com/ioquatix/http-accept).\n\n## Usage\n\n```ruby\nrequire \"i18n\"\nrequire \"i18n/env/config\"\n\nI18n.config = I18n::Env::Config.new\n```\n\nNow `I18n.locale` will be derived from the user's environment.\n\n## Environment Variables\n\nThe following environment variables are searched, in order:\n\n1. `LANGUAGE`\n1. `LC_ALL`\n1. `LC_MESSAGES`\n1. `LANG`\n\n(Just like [gettext](https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html#Locale-Environment-Variables)).\n\nIf an exact match is not found, the list is reevaluated using the locale's parent(s).\nE.g., if `en_US` is not found, we see if `en` is available.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"i18n-env-config\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install i18n-env-config\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaw%2Fi18n-env-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshaw%2Fi18n-env-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaw%2Fi18n-env-config/lists"}