Translation2_Admin::add() – add a new translation


require_once 'Admin.php';

mixed Translation2_Admin::add ( string $stringID , string $pageID = null , array $stringArray )


Add a new translated string (or a set of translated strings) for a given stringID. For instance, to add the English, Spanish and Italian translations for the stringID 'example', use the following code:

= array(

'en' => 'example',

'es' => 'ejemplo',

'it' => 'esempio',




string $stringID

identificator for the string

string $pageID

destination pageID, i.e. the group of strings where this string belongs to.

array $stringArray

Associative array with string translations.

Return value

returns true on success, PEAR_Error on failure


This function can not be called statically.

Remove the language from the langsAvail table and drop the strings table. (Previous) remove a translated string (Next)
Last updated: Sun, 29 Nov 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.