|
Learning with Texts - Fork
2.10.0-fork
Learn foreign languages with texts
|
Responsible for drawing the header when reading texts. More...
Namespaces | |
| Lwt | |
Functions | |
| getData ($textid) | |
| do_header_row ($textid, $langid) | |
| do_title ($title, $sourceURI) | |
| do_settings ($textid) | |
| browser_tts ($text, $languageName) | |
| save_audio_position ($textid) | |
| do_text_header_content ($textid, $only_body=true) | |
Responsible for drawing the header when reading texts.
Call: do_text_header.php?text=[textid]
PHP version 8.1
| browser_tts | ( | $text, | |
| $languageName | |||
| ) |
Prints javascript data and function to read text in your browser.
| string | $text | Text to read |
| string | $languageName | Full name of the language (i. e.: "English") |
@global string $tbpref
Main object for text-to-speech interaction with SpeechSynthesisUtterance
The text to read
{string} ISO code for the language
{string} Rate at wich the speech is done, deprecated since 2.10.0
Check browser compatibility before reading
Start and stop the reading feature.
Change the annotations display mode
| {string} | mode The new annotation mode |
| do_header_row | ( | $textid, | |
| $langid | |||
| ) |
| do_settings | ( | $textid | ) |
| do_text_header_content | ( | $textid, | |
$only_body = true |
|||
| ) |
Main function for displaying header. It will print HTML content.
| string | int | $textid | ID of the required text |
| bool | $only_body | If true, only show the inner body. If false, create a complete HTML document. |
| do_title | ( | $title, | |
| $sourceURI | |||
| ) |
Print the title of the text.
| string | $title | Title of the text |
| string | $sourceURI | URL of the text (if any) |
| getData | ( | $textid | ) |
Get the text and language data associated with the text.
| string | int | $textid | ID of the text |
@global string $tbpref Table name prefix
@psalm-return array<string, float|int|null|string>|false|null
| save_audio_position | ( | $textid | ) |
Save the position of the audio reading for a text.
| string | int | $textid | ID of the text |
Save text status, for instance audio position