wCMF
3.6
|
Public Member Functions | |
getErrorMsg () | |
getMessages ($directory, $pattern, $depth=0) | |
getMessagesFromFile ($file) | |
createPOFile ($projectID, $teamName, $teamEmail, $language, $country, $charset, $filename, $messages) | |
Public Attributes | |
$_errorMsg = '' | |
I18nUtil provides support i18n functionality.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Definition at line 29 of file class.I18nUtil.php.
I18nUtil::getErrorMsg | ( | ) |
Get last error message.
Definition at line 37 of file class.I18nUtil.php.
References $_errorMsg.
I18nUtil::getMessages | ( | $directory, | |
$pattern, | |||
$depth = 0 |
|||
) |
Get all messages from a directory recursively.
directory | The directory to search in |
pattern | The pattern the names of the files to search in must match |
depth | Internal use only |
Definition at line 49 of file class.I18nUtil.php.
References getMessagesFromFile().
I18nUtil::getMessagesFromFile | ( | $file | ) |
Get all messages from a file. Searches for parameters of the Message::get method and usage of the smarty 'translate' function.
file | The file to search in |
Definition at line 94 of file class.I18nUtil.php.
Referenced by getMessages().
I18nUtil::createPOFile | ( | $projectID, | |
$teamName, | |||
$teamEmail, | |||
$language, | |||
$country, | |||
$charset, | |||
$filename, | |||
$messages | |||
) |
Create a message catalog (*.PO file) for use with 'gettext'. The file will be created in the directory 'localeDir/language/LC_MESSAGES/' where 'localeDir' must be given in the configuration file section 'cms'.
projectID | The name of the project |
teamName | The name of the translation team |
teamEmail | The email of the translation team |
language | The language of the file (language code e.g. 'de') |
country | The country of the file (country code e.g. 'DE') |
charset | The charset used (e.g. 'iso-8859-1') |
filename | The name of the file (The Message::get method uses 'main' per default) |
messages | An assoziative array with the messages as keys (becomes 'msgid' in the *.PO file) and assoziative array values with keys 'translation' (becomes 'msgstr' in the *.PO file), 'files' (becomes the reference comment) |
Definition at line 128 of file class.I18nUtil.php.
References InifileParser\getInstance().
I18nUtil::$_errorMsg = '' |
Definition at line 31 of file class.I18nUtil.php.
Referenced by getErrorMsg().