Documentation

text_to_speech_settings.php

\file \brief Utility for calling system speech synthesizer

PHP version 8.1

Tags
category

User_Interface

author

chaosarium leonluleonlu@gmail.com

author

HugoFara Hugo.Farajallah@protonmail.com

license

Unlicense http://unlicense.org/

link
https://hugofara.github.io/lwt/docs/php/files/text-to-speech-settings.html
since
2.2.2-fork

Table of Contents

Functions

get_language_code()  : string
Two-letter language code from from language name (e. g. : "English" = > "en" ).
language_id_from_code()  : int
Return the language ID from a two-letter language code or a BCP 47 tag.
tts_language_options()  : string
String to population a SELECT tag.
tts_settings_form()  : void
Prepare a from for all the TTS settings.
tts_demo()  : void
Prepare a demo for TTS.
tts_js()  : void
Prepare the JavaScript content for text-to-speech.
tts_settings_minimal_page()  : void
Make only a partial, embedable page for text-to-speech settings.
tts_settings_full_page()  : void
Make the complete HTML page for text-to-speech settings.
tts_save_settings()  : void
Save the text-to-speech settings as cookies.

Functions

get_language_code()

Two-letter language code from from language name (e. g. : "English" = > "en" ).

get_language_code(string $language) : string
Parameters
$language : string

Language name, for instance "English"

Tags
ðeprecated

Since 2.9.1-fork, use getLanguageCode

Return values
string

Two-letter language name

language_id_from_code()

Return the language ID from a two-letter language code or a BCP 47 tag.

language_id_from_code(string $code) : int

If two languages have the same country name, only thte first one will be returned.

Parameters
$code : string

Two letters, or four letters separated with caret ("fr" or "en-US").

Return values
int

Language ID if found, -1 otherwise.

tts_language_options()

String to population a SELECT tag.

tts_language_options() : string
Return values
string

HTML-formatted string.

tts_settings_minimal_page()

Make only a partial, embedable page for text-to-speech settings.

tts_settings_minimal_page() : void

tts_settings_full_page()

Make the complete HTML page for text-to-speech settings.

tts_settings_full_page(string $message) : void
Parameters
$message : string

A message to display when page loads.

tts_save_settings()

Save the text-to-speech settings as cookies.

tts_save_settings(array<string|int, mixed> $form) : void
Parameters
$form : array<string|int, mixed>

Inputs from the main form.


        
On this page

Search results