Sha256: 2d7e5622fea2c7732bc73afaad07d93248ea9581d0fccf7a3a9c9feb6875d6d7

Contents?: true

Size: 1.21 KB

Versions: 4

Compression:

Stored size: 1.21 KB

Contents

# GettextSimple

A very simple implementation of Gettext for Ruby.

This is how it could be initialized in Rails and take the locale from I18n.locale:
```ruby
require "gettext_simple"
gettext_simple = GettextSimple.new(:i18n => true)
gettext_simple.load_dir("#{__dir__}/../../locales_gettext")
gettext_simple.register_kernel_methods

puts _("Hello world")
```

Replacements are done this way:
```ruby
puts _("Hello %{name}", :name => "Kasper") #=> "Hello Kasper"
```

## Contributing to gettext_simple
 
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
* Fork the project.
* Start a feature/bugfix branch.
* Commit and push until you are happy with your contribution.
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

## Copyright

Copyright (c) 2014 Kasper Johansen. See LICENSE.txt for
further details.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gettext_simple-0.0.6 README.md
gettext_simple-0.0.5 README.md
gettext_simple-0.0.4 README.md
gettext_simple-0.0.3 README.md