
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
localized_language_select
Advanced tools
h1. LocalizedLanguageSelect
Rails plugin to provide support for localized menu with language names and for storing language information as language code (eg. 'sv'), not name (eg. 'Swedish'), in the database. Uses the Rails internationalization framework ("I18n":http://rails-i18n.org) for translating the names of languages. Requires Rails 2.2 (released November 21st, 2008) or later versions. Language names are loaded from hashes in plugin directory, according to I18n.locale value. You can easily translate language codes in your application like this: <%= I18n.t @user.language, :scope => 'languages' %> Comes with a Rake task rake import:language_select locale=de for importing language names from Unicode.org's CLDR repository (http://www.unicode.org/cldr/data/charts/summary/root.html) Don't forget to restart the application when you add new locale. The code borrows heavily from the LocalizedCountrySelect plugin. See "localized_country_select":http://github.com/karmi/localized_country_select h2. Install & Usage Install as plugin: $ rails plugin install https://github.com/kristianmandrup/localized_language_select.git Install as gem: Insert in Gemfile gem 'localized_language_select' Then to instal it, run: $ bundle install Then to install the locale files, run: $ rails g localized_language_select:locales This will copy the locale files to your Rails config/locales dir. The files will be called 'language.en.yml' and so on... Note: you can specify which locales using the @--locales@ option, which takes a list of locales. $ rails g localized_language_select:locales --locales da en fr h2. Usage example <%= localized_language_select(:user, :language, [], :include_blank => 'Please choose...') %> will become: Please choose... ------------- Afar ... ZaZa
for the en locale.
h2. Options
@:exclude@ option
<%= localized_language_select(:user, :language, ['English'], :include_blank => 'Please choose...', :exclude => ['Afrikaans']) %>
@:only@ option
<%= localized_language_select(:user, :language, ['English'], :include_blank => 'Please choose...', :only => ['German', 'French']) %>
h2. Todo - Request
Please add translations for your language!
Would be nice to have at least: German, Spanish, Chinese, Japanese, Russian, Indian and Arabic (Persian?) in there as well...
h2. Framework usage
This plugin should also integrate nicely with various formbuilders, including Formtastic
Formtastic example:
<%= semantic_form_for @user do |form| %> ... <%= form.input :lang, :as => :language, :priority_languages => ['English'], :include_blank => 'Please choose...', :only => ['German', 'French']) %> ... <% end %>
h2. Copyright
Copyright (c) 2009 David Cato, released under the MIT license
FAQs
Unknown package
We found that localized_language_select 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.