All Projects → vladfaust → i18n.cr

vladfaust / i18n.cr

Licence: MIT license
Internationalization shard 🌍

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to i18n.cr

grav-plugin-langswitcher
Grav LangSwitcher Plugin
Stars: ✭ 22 (-8.33%)
Mutual labels:  internationalization
mobx-react-intl
A connector between mobx-react and react-intl
Stars: ✭ 32 (+33.33%)
Mutual labels:  internationalization
django-i18nfield
Store internationalized strings in Django models with full forms support
Stars: ✭ 32 (+33.33%)
Mutual labels:  internationalization
stone.js
gettext-like client-side Javascript Internationalization Library
Stars: ✭ 20 (-16.67%)
Mutual labels:  internationalization
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-20.83%)
Mutual labels:  internationalization
fluent-vue
Internationalization plugin for Vue.js
Stars: ✭ 137 (+470.83%)
Mutual labels:  internationalization
pH7-Internationalization
🎌 pH7CMS Internationalization (I18N) package 🙊 Get new languages for your pH7CMS website!
Stars: ✭ 17 (-29.17%)
Mutual labels:  internationalization
ar-variation
Variation behavior for ActiveRecord
Stars: ✭ 46 (+91.67%)
Mutual labels:  internationalization
lisan
🌈i18n, Reimagined! 🚀A blazing fast and super small i18n library for Javascript
Stars: ✭ 85 (+254.17%)
Mutual labels:  internationalization
frontend-platform
A framework for Open edX micro-frontend applications.
Stars: ✭ 17 (-29.17%)
Mutual labels:  internationalization
i18n
The Node.js Internationalization Working Group – A Community Committee initiative.
Stars: ✭ 144 (+500%)
Mutual labels:  internationalization
v-intl
Add i18n to your awesome Vue 3 app 🔉
Stars: ✭ 13 (-45.83%)
Mutual labels:  internationalization
locl
Internationalization (i18n) tools suite for Angular
Stars: ✭ 95 (+295.83%)
Mutual labels:  internationalization
i18n-unused
The static analyze tool for finding, marking and removing unused and missing i18n translations in your JavaScript project
Stars: ✭ 76 (+216.67%)
Mutual labels:  internationalization
precis i18n
Python3 implementation of PRECIS framework (RFC 8264, RFC 8265, RFC 8266)
Stars: ✭ 16 (-33.33%)
Mutual labels:  internationalization
mini i18n
🌐 Minimalistic I18n library for Ruby
Stars: ✭ 93 (+287.5%)
Mutual labels:  internationalization
cldr-engine
Internationalization and localization in Typescript with Unicode CLDR, batteries included
Stars: ✭ 34 (+41.67%)
Mutual labels:  internationalization
django-parler-rest
Translatable model support for django-rest-framework
Stars: ✭ 48 (+100%)
Mutual labels:  internationalization
Localisation
Repository for translation and discussion for OpenRCT2.
Stars: ✭ 49 (+104.17%)
Mutual labels:  internationalization
uPortal-web-components
A collection of uPortal Web Components and JavaScript utilities
Stars: ✭ 24 (+0%)
Mutual labels:  internationalization

I18n

Built with Crystal Build status API Docs Releases Awesome vladfaust.com Patrons count Gitter chat

Internationalization module for Crystal.

Supporters

Thanks to all my patrons, I can continue working on beautiful Open Source Software! 🙏

Lauri Jutila, Alexander Maslov, Dainel Vera

You can become a patron too in exchange of prioritized support and other perks

Become Patron

Installation

Add this to your application's shard.yml:

dependencies:
  i18n:
    github: vladfaust/i18n.cr
    version: ~> 0.1.1

This shard follows Semantic Versioning 2.0.0, so see releases and change the version accordingly.

Usage

# es.yml
es:
  apples:
    one: 1 manzana
    other: "%{count} manzanas"
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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].