🌎 HabluHablu is a CLI written in Ruby, which allows you to generate a language file (for I18n) with translations of the most useful phrases. 📕
🎯 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? 📜
- 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...
Important! To be able to use the gem:
- Install I18n gem
Add this line to your application's Gemfile:
gem 'habluhablu'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install habluhablu
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).
Bug reports and pull requests are welcome on GitHub at https://github.com/patrickgramatowski/habluhablu_gem.
The gem is available as open source under the terms of the MIT License.