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
- Host: GitHub
- URL: https://github.com/ruby-i18n/i18n
- Owner: ruby-i18n
- License: mit
- Created: 2008-06-13T12:47:13.000Z (over 17 years ago)
- Default Branch: master
- Last Pushed: 2025-11-16T22:18:30.000Z (24 days ago)
- Last Synced: 2025-11-22T06:02:24.780Z (18 days ago)
- Topics: i18n, ruby
- Language: Ruby
- Homepage:
- Size: 1.71 MB
- Stars: 1,009
- Watchers: 17
- Forks: 417
- Open Issues: 59
- Releases: 51
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/funding.yml
- License: MIT-LICENSE
README.md
Ruby I18n
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 testor justrake- 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
- Name: ruby-i18n
- Login: ruby-i18n
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/8200960?v=4
- Repositories: 3
- Last ynced at: 2024-03-25T19:32:13.361Z
- Profile URL: https://github.com/ruby-i18n
GitHub Events
Total
- Create event: 1
- Commit comment event: 2
- Release event: 1
- Issues event: 10
- Watch event: 24
- Issue comment event: 31
- Push event: 8
- Pull request review event: 6
- Pull request review comment event: 1
- Pull request event: 10
- Fork event: 9
Last Year
- Create event: 1
- Commit comment event: 2
- Release event: 1
- Issues event: 9
- Watch event: 18
- Issue comment event: 30
- Push event: 8
- Pull request event: 7
- Pull request review event: 5
- Fork event: 8
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 | 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:
- shopify.com: 4
- pamediakopes.gr: 2
- fake.server: 1
- rikowski.info: 1
- goodlife.tw: 1
- wyeworks.com: 1
- mac.com: 1
- aleksejleonov.com: 1
- sina.com: 1
- lostapathy.com: 1
- llp.pl: 1
- adva-cms.org: 1
- gerhard-schlager.at: 1
- openwiki.com: 1
- klara.com: 1
- 1000jobboersen.de: 1
- verbasoftware.com: 1
- tma1.com: 1
- ledez.net: 1
- shayon.me: 1
- railsdog.com: 1
- getsatisfaction.com: 1
- wantedly.com: 1
- fengb.info: 1
- moneydesktop.com: 1
- kreeftmeijer.nl: 1
- coditramuntana.com: 1
- artweb-design.de: 1
- ryanbigg.com: 1
- knapo.net: 1
- tigrish.com: 1
- dio.jp: 1
- bitsweat.net: 1
- railway.at: 1
- cultureamp.com: 1
- redhat.com: 1
- jivatechnology.com: 1
- code.org: 1
- markin.net: 1
- g5searchmarketing.com: 1
- plataformatec.com.br: 1
- hardpixel.eu: 1
- miceportal.com: 1
- tanda.co: 1
- shinyshell.net: 1
- julik.nl: 1
- watermark.org: 1
- bartuzi.me: 1
- alchemist.codes: 1
- njclarke.com: 1
- thebrocks.net: 1
- conmolto.org: 1
- jovoto.com: 1
- paperplanes.de: 1
- ruby-lang.org: 1
- nyh.se: 1
- orien.io: 1
- sleepmap.de: 1
- ernesto-jimenez.com: 1
- tylerrick.com: 1
- quorning.net: 1
- oracle.com: 1
- dejimata.com: 1
- cutrer.us: 1
- naildrivin5.com: 1
- marketcircle.com: 1
- mensfeld.pl: 1
- m4ssive.com: 1
- greenriver.com: 1
- rubychan.de: 1
- fastmail.com: 1
- joshpeek.com: 1
- suse.de: 1
- beam.dental: 1
- stembolt.com: 1
- jimmycuadra.com: 1
- jaredbeck.com: 1
- bertg.be: 1
- livingsocial.com: 1
- wheatstack.com: 1
- shopittome.com: 1
- pre-sense.de: 1
- buster.se: 1
- svenfuchs.com: 1
- copyright1984.com: 1
- fastignite.com: 1
- sema.in: 1
- playtype.net: 1
- sikachu.com: 1
- stvs.com: 1
- yandex.ru: 1
- peterberkenbosch.nl: 1
- natwelch.com: 1
- thetrainline.com: 1
- dedasys.com: 1
- a16m.se: 1
- riseup.net: 1
- easy.cz: 1
- kares.org: 1
- andrijevik.net: 1
- lunatic.cat: 1
- o2.pl: 1
- compton.nu: 1
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
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
- Total packages: 11
-
Total downloads:
- rubygems: 2,497,593,212 total
- Total docker downloads: 7,463,578,786
- Total dependent packages: 1,845 (may contain duplicates)
- Total dependent repositories: 1,412,742 (may contain duplicates)
- Total versions: 269
- Total maintainers: 10
- Total advisories: 2
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.
- 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-09T09:36:41.484Z (1 day ago)
- Versions: 85
- Dependent Packages: 1,840
- Dependent Repositories: 1,412,741
- Downloads: 1,249,127,097 Total
- Docker Downloads: 3,731,789,393
-
Rankings:
- Dependent repos count: 0.0%
- Downloads: 0.003%
- Dependent packages count: 0.028%
- Docker downloads count: 0.051%
- Average: 0.555%
- Forks count: 1.314%
- Stargazers count: 1.934%
- Maintainers (9)
- Advisories:
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
- actions/checkout v2 composite
- ruby/setup-ruby v1 composite
- json >= 0
- minitest ~> 5.14
- mocha ~> 1.7.0
- rake ~> 13
- test_declarative = 0.0.6
- concurrent-ruby ~> 1.0
Score: 35.323522635299106