Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ripl-i18n

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ripl-i18n

  • 0.3.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

== Description A ripl plugin that translates ripl to your preferred language. Current supported languages: spanish, chinese, german, portuguese, japanese.

== Usage

Add to your ~/.riplrc:

require 'ripl/i18n'

If a locale exists for your language and is set via your shell variable $LANG, this plugin automatically uses it. Otherwise, explicitly set your language with:

# :es maps to es.yml
Ripl.config[:i18n_locale] = :es

If you want to load and use your own locale:

Ripl::I18n.load 'path/to/my_lang.yml'
Ripl.config[:i18n_locale] = :my_lang

Once you've configured a locale, all messages, errors and even help will print in that locale's language. For example, ripl's help in german:

$ LANG=de ripl -h
Benutzung: ripl [BEFEHL] [ARGUMENTE] [OPTIONEN]

Optionen:
  -f                  Unterdrücke Laden von ~/.irbrc
  -F                  Unterdrücke Laden von ~/.riplrc
  -d, --debug         Setze $DEBUG auf wahr (wie `ruby -d')
  -I PATH             Pfad an den Anfang des $LOAD_PATH hinzufügen. Begrenze mehrfache Pfade mit ':'
  -r, --require FILE  Lade Datei mittels "require" (wie `ruby -r')
  -v, --version       Gib Version aus
  -h, --help          Gib Hilfe aus

== Contribute Your Language

As I would like to make ripl available in as many languages as possible, please add your own! Here's all you have to do:

  • Fork this project.
  • Create a .yml file under lib/ripl/i18n/locales/ for your language. If you're not sure what locale to use for your language, {see some examples}[https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale].
  • Be sure to translate all the keys in lib/ripl/i18n/locales/en.yml.

== Credits

  • janlelis for auto locale + german translation
  • godfat for chinese translation
  • mephistobooks for japanese translation

== Inspiration http://yugui.jp/articles/863

FAQs

Package last updated on 24 Feb 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc