Свойство | Тип | Описание | |
---|---|---|---|
$creationDate | integer | ||
$key | string | ||
$modificationDate | integer | ||
$translations | array |
Метод | Описание | |
---|---|---|
addTranslation ( string $language, string $text ) | ||
clearDependentCache ( ) : void | ||
getByKey ( $id, boolean $create = false, boolean $returnIdIfEmpty = false ) : static | ||
getByKeyLocalized ( $id, boolean $create = false, boolean $returnIdIfEmpty = false, $language = null ) : string | Static Helper to get the translation of the current locale | |
getCreationDate ( ) | ||
getDate ( ) : integer | ||
getForWebserviceExport ( ) : array | ||
getFromWebserviceImport ( $data ) | ||
getKey ( ) : string | ||
getModificationDate ( ) | ||
getTranslation ( $language ) : array | ||
getTranslations ( ) : array | ||
importTranslationsFromFile ( $file, boolean $replaceExistingTranslations = true, $languages = null ) | Imports translations from a csv file The CSV file has to have the same format as an Pimcore translation-export-file | |
save ( ) | ||
setCreationDate ( $date ) | ||
setDate ( $date ) | ||
setKey ( $key ) | ||
setModificationDate ( $date ) | ||
setTranslations ( $translations ) |
Метод | Описание | |
---|---|---|
getValidTranslationKey ( $key ) : string |
public addTranslation ( string $language, string $text ) | ||
$language | string | |
$text | string |
public static clearDependentCache ( ) : void | ||
Результат | void |
public static getByKeyLocalized ( $id, boolean $create = false, boolean $returnIdIfEmpty = false, $language = null ) : string | ||
$id | - translation key | |
$create | boolean | - creates an empty translation entry if the key doesn't exists |
$returnIdIfEmpty | boolean | - returns $id if no translation is available |
Результат | string |
public getTranslation ( $language ) : array | ||
$language | ||
Результат | array |
protected static getValidTranslationKey ( $key ) : string | ||
$key | ||
Результат | string |
public static importTranslationsFromFile ( $file, boolean $replaceExistingTranslations = true, $languages = null ) | ||
$file | - path to the csv file | |
$replaceExistingTranslations | boolean |