i18n
Version, currently 0.1.02 versions
- 0.1.1latestMay 16, 2018
- 0.1.0not indexedJul 9, 2021
github.com/vladfaust/i18n.cr
Internationalization shard 🌍
22 stars
0 dependents
License: MIT
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
i18n:
github: vladfaust/i18n.cr
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
# I18n
[](https://crystal-lang.org/)
[](https://travis-ci.org/vladfaust/i18n.cr)
[](https://vladfaust.com/i18n.cr)
[](https://github.com/vladfaust/i18n.cr/releases)
Internationalization module for [Crystal](https://crystal-lang.org/).
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
i18n:
github: vladfaust/i18n.cr
version: ~> 0.1.0 # See actual version in releases
```
This shard follows [Semantic Versioning 2.0.0](https://semver.org/), so see [releases](https://github.com/vladfaust/i18n.cr/releases) and change the `version` accordingly.
## Usage
```yaml
# es.yml
es:
apples:
one: 1 manzana
other: "%{count} manzanas"
```
```crystal
require "i18n"
require "i18n/backends/yaml"
I18n.backend = I18n::Backends::YAML.new.tap do |backend|
backend.load_paths << Dir.current + "/locales"
backend.load
end
I18n.default_locale # => "en"
I18n.locale = "es"
I18n.t("apples", count: 3) # => "3 manzanas"
```
You can implement your own `I18n::Backend`, as well as your own quantity keys rules (`"one"`, `"many"` etc.). Read more in docs.
## Development
Tests included! Run `crystal spec` while developing.
There is currently no code for localization currencies, date and time etc. If you need it, please open an issue and/or a pull request.
## Contributing
1. Fork it ( https://github.com/vladfaust/i18n.cr/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [@vladfaust](https://github.com/vladfaust) Vlad Faust - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jul 9, 2021
- Commit
613ad2b09381- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/vladfaust/i18n.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 2