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