ajax_add_term_transl.php
\file \brief Add a translation to term.
Call: inc/ajax_add_term_transl.php
Tags
Table of Contents
Functions
- add_new_term_transl() : array<string|int, int|string>|string
- Add the translation for a new term.
- edit_term_transl() : string
- Edit the translation for an existing term.
- do_ajax_check_update_translation() : string
- Edit term translation if it exists.
- do_ajax_add_term_transl() : string
- Add or edit a term translation.
Functions
add_new_term_transl()
Add the translation for a new term.
add_new_term_transl(string $text, int $lang, string $data) : array<string|int, int|string>|string
Parameters
- $text : string
-
Associated text
- $lang : int
-
Language ID
- $data : string
-
Translation
Tags
Return values
array<string|int, int|string>|string —[new word ID, lowercase $text] if success, error message otherwise
edit_term_transl()
Edit the translation for an existing term.
edit_term_transl(int $wid, string $new_trans) : string
Parameters
- $wid : int
-
Word ID
- $new_trans : string
-
New translation
Tags
Return values
string —WoTextLC, lowercase version of the word
do_ajax_check_update_translation()
Edit term translation if it exists.
do_ajax_check_update_translation(int $wid, string $new_trans) : string
Parameters
- $wid : int
-
Word ID
- $new_trans : string
-
New translation
Tags
Return values
string —Term in lower case, or error message if term does not exist
do_ajax_add_term_transl()
Add or edit a term translation.
do_ajax_add_term_transl(int $wid, string $data) : string
Parameters
- $wid : int
-
Word ID
- $data : string
-
Translation
Tags
Return values
string —Database alteration message