Inheritance diagram for TranslationExportXaraya:
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 |
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.
$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.
$project | The TranslationProject to created exported XML file for. |
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.
$text | The text to escape. |
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.
$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().
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.