Свойство | Type | Description | |
---|---|---|---|
$creationDate | integer | ||
$key | string | ||
$modificationDate | integer | ||
$translations | array |
Méthode | Description | |
---|---|---|
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 ) |
Méthode | Description | |
---|---|---|
getValidTranslationKey ( $key ) : string |
public addTranslation ( string $language, string $text ) | ||
$language | string | |
$text | string |
public static clearDependentCache ( ) : void | ||
Résultat | 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 |
Résultat | string |
public getTranslation ( $language ) : array | ||
$language | ||
Résultat | array |
protected static getValidTranslationKey ( $key ) : string | ||
$key | ||
Résultat | string |
public static importTranslationsFromFile ( $file, boolean $replaceExistingTranslations = true, $languages = null ) | ||
$file | - path to the csv file | |
$replaceExistingTranslations | boolean |