Gem Version Build Status

HabluHablu

:earth_americas: HabluHablu is a CLI written in Ruby, which allows you to generate a language file (for I18n) with translations of the most useful phrases. :closed_book:

:dart: The main goal for me is to create a library of translations for the most of languages and maybe even for the most popular dialects.
What about ancient languages? :scroll:

Supported languages

  • English
  • Spanish
  • German
  • French
  • Italian
  • Japanese
  • Russian
  • Korean
  • Portuguese
  • Turkish
  • Polish
  • Hungarian
  • Thai (th - symbol)
  • Chinese (zh - symbol)
  • Arabic
  • Hebrew
  • If you want to help me out and add your language, don't hesitate!
  • In progress...

Installation

Important! To be able to use the gem:

Add this line to your application's Gemfile:

gem 'habluhablu'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install habluhablu

Usage

List of symbols
Generate file for a specific language using habluhablu -l <symbol> command.

Generate an example language file using habluhablu -l example command (it generates empty file with keywords to fill).

Generate files for a more languages using habluhablu -m <symbols>(separated by '_') command.

To generate a keyword for all languages files use: habluhablu -k <keyword> command.

To translate a phrase/word use: habluhablu -t hello_world -f en -o es, where the command translates 'hello there' to spanish (-o flag).

Important! to use translator you will have to create an account Google API and set the api key as ENV variable - ENV['HABLUHABLU_API_KEY']

If you want to generate your own sample for languages files, You can do it by:

  • creating your own sample.yml file in config/locales directory
  • using habluhablu -s <symbols>(separated by '_') command

Generate a json file of the languages you want, use habluhablu -j <symbols>(separated by '_') command.

habluhablu --help

There is also an option to add countries flag using bootstrap (for more informations go to languages/Countries_Flags.md).

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/patrickgramatowski/habluhablu_gem.

License

The gem is available as open source under the terms of the MIT License.