Fetch a string from the database or create a new one from passed data.
TranslationString object can be constructed three ways:
$original = "", $stringID > 0: the specified string will be loaded from the database.
$original != "", $stringID > 0: the object instance is initailized with that data as if it was loaded from the database.
$original != "", $stringID = 0: in the way to create a new string with ->Save();
- Parameters:
-
| $stringID | Specifies which string to load from the database, 0 if passing all other data! |
| $projectID | To which project this string belongs. |
| $original | The original language string. |
| $localeID | The locale ID of the specified translation. |
| $translation | The translation of the $original string to $loccaleID locale. |
| $sentenceID | ID of the ($origingal) string in the SentenceIndex table. |
| $lastSeen | Unix timestamp of this string's last insert or update. |
| $rowOrder | The row order index of this string in its project, see SetRowOrder(). |
- Exceptions:
- 'Exception' thrown if not existing $StringID is passed for loading from db
Definition at line 67 of file TranslationString.php.
References $DB, GetDbConn(), and GetTables(). |