All Projects → midwire → tr4n5l4te

midwire / tr4n5l4te

Licence: other
Use Google Translate without an API key.

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to tr4n5l4te

Texterify
The localization management system.
Stars: ✭ 37 (+15.63%)
Mutual labels:  i18n, internationalization, translate
React Translated
A dead simple way to add complex translations (i18n) in a React (DOM/Native) project 🌎🌍🌏
Stars: ✭ 176 (+450%)
Mutual labels:  i18n, internationalization, translate
react-translator-component
React language translation module for developing a multilingual project.
Stars: ✭ 13 (-59.37%)
Mutual labels:  translator, internationalization, translate
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-40.62%)
Mutual labels:  i18n, internationalization, translate
ad localize
ADLocalize is a simple way to manage your localization files. Supported wording sources : CSVs and Google Sheets. Localization file generation available for iOS, Android, JSON (i18next), YAML and Java properties
Stars: ✭ 22 (-31.25%)
Mutual labels:  i18n, yaml, internationalization
Flutter translate
Flutter Translate is a fully featured localization / internationalization (i18n) library for Flutter.
Stars: ✭ 245 (+665.63%)
Mutual labels:  i18n, internationalization, translate
React Intl Hooks
React hooks for internationalization without the hassle ⚛️🌍
Stars: ✭ 64 (+100%)
Mutual labels:  i18n, internationalization, translate
deepl-php-lib
🧠 DeepL API Client Library supporting PHP >= 7.3
Stars: ✭ 50 (+56.25%)
Mutual labels:  i18n, translator, translate
php-google-translate-for-free
Library for free use Google Translator. With attempts connecting on failure and array support.
Stars: ✭ 124 (+287.5%)
Mutual labels:  translator, translate, google-translate
HighlightTranslator
Highlight Translator can help you to translate the words quickly and accurately. By only highlighting, copying, or screenshoting the content you want to translate anywhere on your computer (ex. PDF, PPT, WORD etc.), the translated results will then be automatically displayed before you.
Stars: ✭ 54 (+68.75%)
Mutual labels:  translator, translate, google-translate
node-google-translate-skidz
Simple Node.js library for talking to Google's Translate API for free.
Stars: ✭ 70 (+118.75%)
Mutual labels:  translator, translate, google-translate
translate
A module grouping multiple translation APIs
Stars: ✭ 321 (+903.13%)
Mutual labels:  translator, translate, google-translate
mobx-react-intl
A connector between mobx-react and react-intl
Stars: ✭ 32 (+0%)
Mutual labels:  i18n, internationalization
lisan
🌈i18n, Reimagined! 🚀A blazing fast and super small i18n library for Javascript
Stars: ✭ 85 (+165.63%)
Mutual labels:  i18n, internationalization
cldr-engine
Internationalization and localization in Typescript with Unicode CLDR, batteries included
Stars: ✭ 34 (+6.25%)
Mutual labels:  i18n, internationalization
frontend-platform
A framework for Open edX micro-frontend applications.
Stars: ✭ 17 (-46.87%)
Mutual labels:  i18n, internationalization
fluent-vue
Internationalization plugin for Vue.js
Stars: ✭ 137 (+328.13%)
Mutual labels:  i18n, internationalization
simple-translator
Simple, universal translation with pure JavaScript.
Stars: ✭ 58 (+81.25%)
Mutual labels:  i18n, translator
deepl-api-connector
Connector library for deepl.com rest translation api
Stars: ✭ 12 (-62.5%)
Mutual labels:  i18n, translator
ar-variation
Variation behavior for ActiveRecord
Stars: ✭ 46 (+43.75%)
Mutual labels:  i18n, internationalization

Tr4n5l4te

Version: 0.1.14

Use Google Translate without an API key.

Like me, maybe you've found that Google makes it a pain to work with their API. Tr4n5l4te gets around all that.

Installation

First, install PhantomJS.

Add this line to your application's Gemfile:

gem 'tr4n5l4te'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tr4n5l4te

Usage

In your code:

translator = Tr4n5l4te::Translator.new
english_strings = [
  'hello',
  'how are you'
]
english_strings.each do |text|
  puts translator.translate(text, :en, :es)
end
# => hola
# => cómo estás

Command Line

➤ ./exe/translate -h
Options:
  -y, --yaml-file=<s>     A YAML locale file - filename determines source language 'en.yml' - English
  -l, --lang=<s>          Destination language
  -i, --list              List known languages
  -s, --sleep-time=<i>    Sleep time (default: 2)
  -t, --timeout=<i>       Poltergeist timeout option (default: 30)
  -v, --verbose           Be verbose with output
  -h, --help              Show this message

To translate a YAML file:

$ ./exe/translate -y /path/to/yml/file -l "destination-language"

The translator will sleep for 2 seconds, by default, between each string translation. You can override that by passing in the amount of time, in seconds, you want it to sleep:

$ ./exe/translate -y config/locales/en.yml -l French -s 3

Warning: If you pass in '0' and translate a large file, it is very likely that Google will ban your IP address.

To list all known languages

$ ./exe/translate --list

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Specs

The specs are sprinkled with integration tests which will actually go out and hit the live web. To run them:

$ INTEGRATION=1 rake spec

Please be kind or Google is likely to ban your IP address.

Spec Coverage

$ INTEGRATION=1 COVERAGE=1 rake spec
$ open coverage/index.html # if you are on OSX

Contributing

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

Contributors

Thanks to all of those who contribute!

  • @kirylpl - Fixed phantomjs selector, migration to Optimist gem
  • @gahia - Fixed phantomjs SSL handshake problem, Look for and report non-neutral gender translations. Now accepts the "male" translation by default and warns that there are alternatives, Don't fail if a translation is not found but instead show a warning message and continue.

License

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

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].