Documentation

ggl.php

Google Translate interface

Call: ggl.php?text=[text]&sl=[source language]&tl=[target language] ... translate text ... sent=[int] ... single sentence mode.

PHP version 8.1

Tags
author

LWT Project lwt-project@hotmail.com

license

Unlicense http://unlicense.org/

link
https://hugofara.github.io/lwt/docs/php/files/ggl.html
since
1.6.0
since
2.7.0

Refactored with functional paradigm

Table of Contents

Functions

translate_sentence()  : void
Translate a single sentence using Google Translate.
translate_term()  : void
Translate input text using Google Translate.
translate_text()  : void
Translate input text using Google Translate.
do_content()  : void
Translate input text using Google Translate.

Functions

translate_sentence()

Translate a single sentence using Google Translate.

translate_sentence(string $text, string $translation) : void
Parameters
$text : string

Text to translate

$translation : string

Sentence translation

translate_term()

Translate input text using Google Translate.

translate_term(string $text, array<string|int, mixed> $file, string $sl, string $tl) : void
Parameters
$text : string

Text to translate

$file : array<string|int, mixed>

Array of translated terms

$sl : string

Source language (e. g. "es")

$tl : string

Target language (e. g. "en")

translate_text()

Translate input text using Google Translate.

translate_text(string $text, string $sl, string $tl, bool $sentence_mode) : void
Parameters
$text : string

Text to translate

$sl : string

Source language (e. g. "es")

$tl : string

Target language (e. g. "en")

$sentence_mode : bool

Set to true for full sentence translation

do_content()

Translate input text using Google Translate.

do_content(string $text) : void
Parameters
$text : string

Text to translate


        
On this page

Search results