A summary of data about the Ruby ecosystem.

https://github.com/ruby-i18n/i18n

Internationalization (i18n) library for Ruby
https://github.com/ruby-i18n/i18n

Keywords

i18n ruby

Keywords from Contributors

activerecord activejob mvc rubygems rack rspec sinatra crash-reporting background-jobs rubocop

Last synced: about 16 hours ago
JSON representation

Repository metadata

Internationalization (i18n) library for Ruby

README.md

Ruby I18n

Gem Version
Build Status

Ruby internationalization and localization (i18n) solution.

Currently maintained by @radar.

Usage

Rails

You will most commonly use this library within a Rails app.

We support Rails versions from 6.0 and up.

See the Rails Guide for an example of its usage.

Ruby (without Rails)

We support Ruby versions from 3.0 and up.

If you want to use this library without Rails, you can simply add i18n to your Gemfile:

gem 'i18n'

Then configure I18n with some translations, and a default locale:

I18n.load_path += Dir[File.expand_path("config/locales") + "/*.yml"]
I18n.default_locale = :en # (note that `en` is already the default!)

A simple translation file in your project might live at config/locales/en.yml and look like:

en:
  test: "This is a test"

You can then access this translation by doing:

I18n.t(:test)

You can switch locales in your project by setting I18n.locale to a different value:

I18n.locale = :de
I18n.t(:test) # => "Dies ist ein Test"

Features

  • Translation and localization
  • Interpolation of values to translations
  • Pluralization (CLDR compatible)
  • Customizable transliteration to ASCII
  • Flexible defaults
  • Bulk lookup
  • Lambdas as translation data
  • Custom key/scope separator
  • Custom exception handlers
  • Extensible architecture with a swappable backend

Pluggable Features

  • Cache
  • Pluralization: lambda pluralizers stored as translation data
  • Locale fallbacks, RFC4647 compliant (optionally: RFC4646 locale validation)
  • Gettext support
  • Translation metadata

Alternative Backend

  • Chain
  • ActiveRecord (optionally: ActiveRecord::Missing and ActiveRecord::StoreProcs)
  • KeyValue (uses active_support/json and cannot store procs)

For more information and lots of resources see the 'Resources' page on the wiki.

Tests

You can run tests both with

  • rake test or just rake
  • run any test file directly, e.g. ruby -Ilib:test test/api/simple_test.rb

You can run all tests against all Gemfiles with

  • ruby test/run_all.rb

The structure of the test suite is a bit unusual as it uses modules to reuse
particular tests in different test cases.

The reason for this is that we need to enforce the I18n API across various
combinations of extensions. E.g. the Simple backend alone needs to support
the same API as any combination of feature and/or optimization modules included
to the Simple backend. We test this by reusing the same API definition (implemented
as test methods) in test cases with different setups.

You can find the test cases that enforce the API in test/api. And you can find
the API definition test methods in test/api/tests.

All other test cases (e.g. as defined in test/backend, test/core_ext) etc.
follow the usual test setup and should be easy to grok.

More Documentation

Additional documentation can be found here: https://github.com/ruby-i18n/i18n/wiki

Contributors

  • @radar
  • @carlosantoniodasilva
  • @josevalim
  • @knapo
  • @tigrish
  • and many more

License

MIT License. See the included MIT-LICENSE file.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 1,175
Total Committers: 206
Avg Commits per committer: 5.704
Development Distribution Score (DDS): 0.711

Commits in past year: 18
Committers in past year: 7
Avg Commits per committer in past year: 2.571
Development Distribution Score (DDS) in past year: 0.667

Name Email Commits
Sven Fuchs s****s@a****e 339
Ryan Bigg me@r****m 183
Carlos Antonio da Silva c****a@g****m 84
José Valim j****m@g****m 69
knapo k****o@k****t 27
Christopher Dell c****s@t****m 23
Lawrence Pit l****t@g****m 22
Akira Matsuda r****e@d****p 21
Michael Overmeyer m****r@s****m 19
Jeremy Kemper j****y@b****t 12
fatkodima f****3@g****m 11
Paarth Madan p****n@s****m 11
Clemens Kofler c****s@r****t 8
Ryan Bigg r****g@c****m 8
Vít Ondruch v****h@r****m 7
Theo Cushion t****o@j****m 7
Krzysztof Rybka k****a@g****m 6
Olle Jonsson o****n@g****m 6
Will Jordan w****l@c****g 6
Yaroslav Markin y****v@m****t 6
tom-lord l****m@g****m 6
Chris Stringer c****r@g****m 6
José Valim j****m@p****r 6
thedarkone t****2@g****m 5
Jean Boussier j****r@g****m 5
Aaron Patterson a****n@g****m 5
Nikos Dimitrakopoulos n****s@p****r 5
jonian j****n@h****u 5
Romulo A. Ceccon r****n@g****m 4
michael m****l@m****m 4
and 176 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 15 days ago

Total issues: 77
Total pull requests: 117
Average time to close issues: 2 months
Average time to close pull requests: 3 months
Total issue authors: 69
Total pull request authors: 55
Average comments per issue: 3.22
Average comments per pull request: 1.83
Merged pull request: 92
Bot issues: 0
Bot pull requests: 0

Past year issues: 9
Past year pull requests: 17
Past year average time to close issues: 1 day
Past year average time to close pull requests: about 2 months
Past year issue authors: 9
Past year pull request authors: 9
Past year average comments per issue: 1.33
Past year average comments per pull request: 1.29
Past year merged pull request: 8
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ruby-i18n/i18n

Top Issue Authors

  • movermeyer (8)
  • viralpraxis (2)
  • arianf (1)
  • nakwa (1)
  • hardik-plume (1)
  • lavrovdv (1)
  • toncid (1)
  • aaronfrary (1)
  • tubaxenor (1)
  • yheuhtozr (1)
  • domingo2000 (1)
  • jrizmal (1)
  • aliahmadexe (1)
  • qbantek (1)
  • dmitrue (1)

Top Pull Request Authors

  • radar (11)
  • movermeyer (10)
  • amatsuda (7)
  • fatkodima (6)
  • paarthmadan (6)
  • voxik (4)
  • olleolleolle (4)
  • stereobooster (3)
  • tom-lord (3)
  • casperisfine (2)
  • j0sh3rs (2)
  • Earlopain (2)
  • lee266 (2)
  • mishina2228 (2)
  • Bilka2 (2)

Top Issue Labels

  • no-repro (4)
  • pr-required (3)
  • has-repro-steps (1)

Top Pull Request Labels


Package metadata

gem.coop: i18n

New wave Internationalization support for Ruby.

  • Homepage: https://github.com/ruby-i18n/i18n
  • Documentation: http://www.rubydoc.info/gems/i18n/
  • Licenses: MIT
  • Latest release: 1.14.7 (published 11 months ago)
  • Last Synced: 2025-12-08T12:32:44.504Z (2 days ago)
  • Versions: 85
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,248,466,115 Total
  • Docker Downloads: 3,731,789,393
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Downloads: 0.003%
    • Average: 0.004%
    • Docker downloads count: 0.015%
  • Maintainers (9)
rubygems.org: i18n

New wave Internationalization support for Ruby.

alpine-v3.18: ruby-i18n

New wave Internationalization support for Ruby

  • Homepage: https://github.com/ruby-i18n/i18n
  • Licenses: MIT
  • Latest release: 1.13.0-r0 (published over 2 years ago)
  • Last Synced: 2025-12-03T14:28:33.393Z (7 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 3.056%
    • Forks count: 4.04%
    • Stargazers count: 8.184%
  • Maintainers (1)
alpine-edge: ruby-i18n

New wave Internationalization support for Ruby

  • Homepage: https://github.com/ruby-i18n/i18n
  • Licenses: MIT
  • Latest release: 1.14.7-r0 (published 8 months ago)
  • Last Synced: 2025-12-08T14:02:29.204Z (2 days ago)
  • Versions: 9
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Forks count: 5.013%
    • Average: 5.09%
    • Dependent packages count: 6.031%
    • Stargazers count: 9.314%
  • Maintainers (1)
proxy.golang.org: github.com/ruby-i18n/i18n

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/ruby-i18n/i18n#section-documentation
  • Licenses: mit
  • Latest release: v1.14.7 (published 11 months ago)
  • Last Synced: 2025-12-08T14:02:12.302Z (2 days ago)
  • Versions: 80
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.48%
    • Average: 6.698%
    • Dependent repos count: 6.917%
alpine-v3.17: ruby-i18n

New wave Internationalization support for Ruby

  • Homepage: https://github.com/ruby-i18n/i18n
  • Licenses: MIT
  • Latest release: 1.12.0-r0 (published over 3 years ago)
  • Last Synced: 2025-12-03T11:57:29.348Z (7 days ago)
  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Forks count: 3.553%
    • Average: 7.552%
    • Stargazers count: 7.702%
    • Dependent packages count: 18.951%
  • Maintainers (1)
conda-forge.org: rb-i18n

  • Homepage: https://rubygems.org/gems/i18n
  • Licenses: MIT
  • Latest release: 1.7.0 (published about 6 years ago)
  • Last Synced: 2025-12-07T21:03:34.566Z (3 days ago)
  • Versions: 4
  • Dependent Packages: 3
  • Dependent Repositories: 1
  • Rankings:
    • Forks count: 8.384%
    • Stargazers count: 13.174%
    • Average: 15.376%
    • Dependent packages count: 15.649%
    • Dependent repos count: 24.298%
alpine-v3.19: ruby-i18n

New wave Internationalization support for Ruby

  • Homepage: https://github.com/ruby-i18n/i18n
  • Licenses: MIT
  • Latest release: 1.14.1-r0 (published over 2 years ago)
  • Last Synced: 2025-12-08T14:01:44.336Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.20: ruby-i18n

New wave Internationalization support for Ruby

  • Homepage: https://github.com/ruby-i18n/i18n
  • Licenses: MIT
  • Latest release: 1.14.4-r0 (published over 1 year ago)
  • Last Synced: 2025-12-07T21:03:09.909Z (3 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.22: ruby-i18n

New wave Internationalization support for Ruby

  • Homepage: https://github.com/ruby-i18n/i18n
  • Licenses: MIT
  • Latest release: 1.14.7-r0 (published 8 months ago)
  • Last Synced: 2025-12-08T14:02:27.752Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.21: ruby-i18n

New wave Internationalization support for Ruby

  • Homepage: https://github.com/ruby-i18n/i18n
  • Licenses: MIT
  • Latest release: 1.14.6-r0 (published about 1 year ago)
  • Last Synced: 2025-12-08T14:02:28.380Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)

Dependencies

.github/workflows/ruby.yml actions
  • actions/checkout v2 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems
  • json >= 0
  • minitest ~> 5.14
  • mocha ~> 1.7.0
  • rake ~> 13
  • test_declarative = 0.0.6
i18n.gemspec rubygems
  • concurrent-ruby ~> 1.0

Score: 35.323522635299106