i18n: yet another internationalization library for Crystal

Crystal I18n is an internationalization library for the Crystal programming language. It provides a unified interface allowing to leverage translations and localized contents in a Crystal project.

Features:

  • Translation lookups
  • Localization
  • Interpolation
  • Pluralization rules
  • Locale fallbacks
  • Flexible configuration

Crystal I18n initially draws its inspiration from Ruby I18n and rails-i18n. Originally, pluralization and localization rules all come from rails-i18n as well.

Online browsable documentation is available at https://crystal-i18n.github.io.

The official Crystal snap is available

During the Snapcraft Summit Crystal team released the official snap package of the Crystal language

https://snapcraft.io/crystal

On Ubuntu 16.04 or later, you can install the Crystal snap with the following command:

sudo snap install crystal --classic

Snap uses the "channel" feature to release multiple Crystal series concurrently. For example, without specifying a channel, currently Crystal 0.29.0 will be installed. But if you want to install 0.30.0-dev, specify the latest/edge channel as follows:

sudo snap install crystal --edge --classic

Crest v0.10 has been released

Today, I am very pleased to announce the release of Crest version 0.10!

Another Crystal HTTP library? Why should I care?

Beloved features:

  • Redirects support.
  • HTTP(S) proxy support.
  • Elegant Key/Value headers, cookies, params, and payload.
  • Multipart file uploads.
  • Logging.

Hopefully, someday I can remove this shard though. Ideally, Crystal's standard library would do all this already.

More info you can find on the project page: https://github.com/mamantoha/crest

New capabilities of version 0.10 include:

  • Crest and Crest::Request verb methods(get, post, etc.) can yields the Crest::Request to the block.
response = Crest::Request.get("http://example.com") do |request|
  request.headers.add("foo", "bar")
end
  • Crest::Request and Crest::Resource initializer can accept the instance of HTTP::Client via http_client method.

This is useful for unusual cases when you want to set additional options (e.g. read timeout, authorization header etc.).

client = HTTP::Client.new("http://example.com")
client.read_timeout = 1.second

begin
  Crest::Request.new(:get,
    "http://example.com/delay",
    http_client: client
  )
rescue IO::Timeout
  puts "Timeout!"
end