TranslationExportXaraya Class Reference

Inheritance diagram for TranslationExportXaraya:

ITranslationExport List of all members.

Detailed Description

Recreates the Xaraya locale files from the database

Does exactly the opposite than TranslationImportXaraya. Note, that dead projects won't be exported.

Definition at line 30 of file TranslationExportXaraya.php.

Public Member Functions

 FixEntity ($text)
 Export ($localeName, $silentMode=false)

Private Member Functions

ExportProject (TranslationProject $project)
 ProcessRecursive ($dir, ProjectIterator $projectIterator)

Private Attributes

 $RootTimeStamp
 $SilentMode


Member Function Documentation

TranslationExportXaraya::Export ( localeName,
silentMode = false 
)

Export finished Xaraya translations of the selected locale into the selected directory.

Exporting will process all projects in the given locale's Xaraya root, create a language pack directory strucure on the $CONFIG configured destination.

Parameters:
$localeName string Name of the locale to be exported (e.g. "hu_HU.utf-8").
$silentMode bool true value suppresses all output messages.

Implements ITranslationExport.

Definition at line 175 of file TranslationExportXaraya.php.

References TranslationProject::$LocaleIDCache, GetConfigVar(), and ProcessRecursive().

& TranslationExportXaraya::ExportProject ( TranslationProject project  )  [private]

Export the translation strings of one project and return as updated document xml string.

Gets the passed project's strings from the database and puts them in the project's $Skeleton document, returns the resulting string.

Parameters:
$project The TranslationProject to created exported XML file for.
Returns:
string The resulting translated XML document.

Definition at line 45 of file TranslationExportXaraya.php.

References FixEntity().

Referenced by ProcessRecursive().

TranslationExportXaraya::FixEntity ( text  ) 

Fix string for using in XML output. This may need changes with other DOMDocument versions.

Becuase the current domdocument actions look broken, thus we need to fix some things here.

Parameters:
$text The text to escape.
Returns:
string: The escaped text &,<,>," replaced with entities.

Definition at line 101 of file TranslationExportXaraya.php.

Referenced by ExportProject().

TranslationExportXaraya::ProcessRecursive ( dir,
ProjectIterator projectIterator 
) [private]

Create directories and translated files according to the project tree and strings database.

Calls ->ExportProject() on all translation projects recurisvely from the given root. This is a recursive function which calls itself for subdirectories.

Parameters:
$dir String, the directory where the subdirectories and files should be created.
$projectIterator The iterator initialized with the root project from where we export.

Definition at line 119 of file TranslationExportXaraya.php.

References ExportProject().

Referenced by Export().


Member Data Documentation

TranslationExportXaraya::$RootTimeStamp [private]

Timestamp of the root project, older projects won't be exported as they are consdered to be dead projects

Definition at line 33 of file TranslationExportXaraya.php.

TranslationExportXaraya::$SilentMode [private]

Supress all messages while exporting?

Definition at line 34 of file TranslationExportXaraya.php.


The documentation for this class was generated from the following file:
Generated on Tue Mar 20 00:42:40 2007 for XarayaTranslationMemory by  doxygen 1.4.7