
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Set I18n.locale
based on the environment variables that control the locale.
This is for Desktop applications only. For web application see http_accept_languge or http-accept.
require "i18n"
require "i18n/env/config"
I18n.config = I18n::Env::Config.new
Now I18n.locale
will be derived from the user's environment.
The following environment variables are searched, in order:
LANGUAGE
LC_ALL
LC_MESSAGES
LANG
(Just like gettext).
If an exact match is not found, the list is reevaluated using the locale's parent(s).
E.g., if en_US
is not found, we see if en
is available.
Add this line to your application's Gemfile:
gem "i18n-env-config"
And then execute:
$ bundle
Or install it yourself as:
$ gem install i18n-env-config
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that i18n-env-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.