📚 Looking for current Exponential documentation? This site contains legacy SDK & API reference docs (eZ Publish era). For up-to-date 2026 product documentation, visit doc.exponential.earth.

  class / eZTSTranslator  

eZTSTranslator Class Reference
[Translation]

This provides internationalization using XML (.ts) files. More...

Inheritance diagram for eZTSTranslator:

TODO — Image not available in archive

Title:   eZTSTranslator Class Inheritance Diagram (Doxygen)
File:    /doc/generated/html/classeZTSTranslator.png

What this image shows:
Doxygen-generated class inheritance diagram for the eZTSTranslator PHP class. Shows the inheritance hierarchy: which classes eZTSTranslator extends and which classes inherit from it, with links to parent and child class documentation. This diagram was auto-generated from the Exponential 3.1 PHP source code using Doxygen circa 2003.

Replacement instructions:
Run Doxygen on the Exponential 3.1 PHP source and locate the generated classeZTSTranslator.png in the output. Or draw the inheritance tree manually from the API reference. Save as /doc/generated/html/classeZTSTranslator.png

See /sdk/missing.html for the full list of missing images.
eZTranslatorHandler List of all members.

Public Methods

 eZTSTranslator ($file=null,$root=false,$useCache=true)
 setOverrideDir ($dir)
findKey ($key)
findMessage ($context,$source,$comment=null)
keyTranslate ($key)
translate ($context,$source,$comment=null)
 insert ($context,$source,$translation,$comment=null)
 remove ($context,$source,$message=null)
 removeKey ($key)

Static Public Methods

 exists ($file,$root=false)
initialize ($file,$root=false,$useCache=true)
 overrideDir ()

Private Attributes

 Messages

Detailed Description

This provides internationalization using XML (.ts) files.

Definition at line eztstranslator.php.


Constructor & Destructor Documentation

eZTSTranslator::eZTSTranslator   file = null,
  root = false,
  useCache = true
 

Construct the translator and loads the translation file $file if it is set and exists.

Definition at line eztstranslator.php.

References Messages.

Referenced by initialize().


Member Function Documentation

eZTSTranslator::exists   file,
  root = false
[static]
 

Returns:
true if the translation file exists.

Definition at line eztstranslator.php.

& eZTSTranslator::findKey   key [virtual]
 

Reimplemented for internal reasons; the API is not affected.

Implements eZTranslatorHandler.

Definition at line eztstranslator.php.

References Messages.

Referenced by keyTranslate().

& eZTSTranslator::findMessage   context,
  source,
  comment = null
[virtual]
 

Reimplemented for internal reasons; the API is not affected.

Implements eZTranslatorHandler.

Definition at line eztstranslator.php.

References eZTranslatorManager::instance().

Referenced by translate().

& eZTSTranslator::initialize   file,
  root = false,
  useCache = true
[static]
 

Initialize the ts translator if this is not allready done.

Definition at line eztstranslator.php.

References eZTranslatorManager::instance().

eZTSTranslator::insert   context,
  source,
  translation,
  comment = null
 

Inserts the $translation for the $context and $source as a translation message and returns the key for the message. If $comment is non-null it will be included in the message.

If the translation message exists no new message is created and the existing key is returned.

Definition at line eztstranslator.php.

References Messages.

& eZTSTranslator::keyTranslate   key [virtual]
 

Reimplemented for internal reasons; the API is not affected.

Implements eZTranslatorHandler.

Definition at line eztstranslator.php.

References findKey().

eZTSTranslator::overrideDir   [static]
 

Returns:
the override directory, if no directory has been set "override" is returned.
The override directory is relative to the rootDir().

Definition at line eztstranslator.php.

eZTSTranslator::remove   context,
  source,
  message = null
 

Removes the translation message with $context and $source. Returns true if the message was removed, false otherwise.

If you have the translation key use removeKey() instead.

Definition at line eztstranslator.php.

References eZTranslatorManager::instance().

eZTSTranslator::removeKey   key
 

Removes the translation message with $key. Returns true if the message was removed, false otherwise.

Definition at line eztstranslator.php.

eZTSTranslator::setOverrideDir   dir
 

Sets the override directory to $dir.

Definition at line eztstranslator.php.

& eZTSTranslator::translate   context,
  source,
  comment = null
[virtual]
 

Reimplemented for internal reasons; the API is not affected.

Implements eZTranslatorHandler.

Definition at line eztstranslator.php.

References findMessage().


Member Data Documentation

eZTSTranslator::Messages [private]
 

Contains the hash table with message translations

Definition at line eztstranslator.php.

Referenced by insert().


The documentation for this class was generated from the following file:  

Exponential Copyright © 1998 - 2026 7x