Description
Packagist: https://packagist.org/packages/dejurin/php-google-translate-for-free
Library for free use Google Translator. With attempts connecting on failure and array support.
Google Translate For Free alternatives and similar libraries
Based on the "Strings" category.
Alternatively, view Google Translate For Free alternatives based on common mentions on social networks and blogs.
-
Mobile-Detect
Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. -
UUID
:snowflake: A PHP library for generating universally unique identifiers (UUIDs). -
Agent
👮 A PHP desktop/mobile user agent parser with support for Laravel, based on Mobiledetect -
SQL Formatter
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting. -
Device Detector
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model. -
Slugify
Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte. -
Stringy
A PHP string manipulation library with multibyte support -
Jieba-PHP
"結巴"中文分詞:做最好的 PHP 中文分詞、中文斷詞組件。 / "Jieba" (Chinese for "to stutter") Chinese text segmentation: built to be the best PHP Chinese word segmentation module. -
Regex
A sane interface for php's built in preg_* functions -
URLify
A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs. -
Portable UTF-8
🉑 Portable UTF-8 library - performance optimized (unicode) string functions for PHP. -
Portable ASCII
🔡 Portable ASCII library - performance optimized (ascii) string functions for PHP. -
Color Jizz
ColorJizz is a PHP library for manipulating and converting colors. -
HtmlMin
:clamp: HtmlMin: HTML Compressor and Minifier via PHP -
Case converter
Convert strings between 13 naming conventions: Snake case, Camel case, Kebab case, Pascal case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Title case, Sentence case and Dot notation. -
HaikunatorPHP
Generate Heroku-like random names to use in your php applications. -
Patchwork UTF-8
Extensive, portable and performant handling of UTF-8 and grapheme clusters for PHP -
Url highlight
PHP library to parse urls from string input -
Russian metaphone phonetic algorithm implementation for PHP
Russian metaphone algorithm implementation
Cloudways' Black Friday Offer - 1st Choice of Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Google Translate For Free or a related project?
README
GoogleTranslateForFree
Packagist: https://packagist.org/packages/dejurin/php-google-translate-for-free
Library for free use Google Translator. With attempts connecting on failure and array support.
Installation
Install this package via Composer.
composer require dejurin/php-google-translate-for-free
Or edit your project's composer.json
to require dejurin/php-google-translate-for-free
and then run composer update
.
"require": {
"dejurin/php-google-translate-for-free": "^1.0"
}
Usage
require_once ('vendor/autoload.php');
use \Dejurin\GoogleTranslateForFree;
Single
$source = 'en';
$target = 'ru';
$attempts = 5;
$text = 'Hello';
$tr = new GoogleTranslateForFree();
$result = $tr->translate($source, $target, $text, $attempts);
var_dump($result);
/*
string(24) "Здравствуйте"
*/
Array
$source = 'en';
$target = 'ru';
$attempts = 5;
$arr = ['hello','world'];
$tr = new GoogleTranslateForFree();
$result = $tr->translate($source, $target, $arr, $attempts);
var_dump($result);
/*
array(2) {
[0]=>
string(24) "Здравствуйте"
[1]=>
string(6) "Мир"
}
*/
License
This source code is distributed under MIT license.
Sponsors
https://currencyrate.today
https://fx-w.io/
*Note that all licence references and agreements mentioned in the Google Translate For Free README section above
are relevant to that project's source code only.