gettext.cr v1.0.0

Crystal bindings for the GNU & Musl gettext library.

gettext.cr

Crystal bindings for the GNU & Musl gettext library.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      gettext:
        github: GeopJr/gettext.cr
    
  2. Run shards install

Usage

Docs include examples, but here's a generic one:

require "gettext"

Gettext.setlocale(Gettext::LC::ALL, "el_GR.UTF-8")
Gettext.dgettext("gedit", "Text Editor") # => "Επεξεργαστής κειμένου"
Gettext.ngettext("Crystal", "Crystals", rand(5)) # => "Crystals" or "Crystal"

Contributing

  1. Read the Code of Conduct
  2. Fork it (https://github.com/GeopJr/gettext.cr/fork)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request
Repository

gettext.cr

Owner
Statistic
  • 4
  • 2
  • 0
  • 5
  • 0
  • about 2 years ago
  • February 12, 2022
License

BSD 2-Clause "Simplified" License

Links
Synced at

Sat, 27 Apr 2024 05:22:23 GMT

Languages