Class Mage_Core_Model_Translate_Inline
Inline Translations PHP part
Package: Mage\Core
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Core/Model/Translate/Inline.php
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Core/Model/Translate/Inline.php
public
boolean
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
protected
string
|
|
protected
string
|
|
protected
string
|
|
protected
array
|
#
_getTranslateData( string $regexp, string & $text, string|array $locationCallback, array $options = array() )
Get translate data by regexp |
protected
|
|
protected
|
#
_prepareTagAttributesForContent( string & $content )
Prepare tags inline translates for the content |
protected
string
|
|
protected
|
|
protected
string
|
#
_applySpecialTagsFormat( string $tagHtml, string $tagName, array $trArr )
Format translate for special tags |
protected
string
|
#
_applySimpleTagsFormat( string $tagHtml, string $tagName, array $trArr )
Format translate for simple tags |
protected
|
#
_translateTags( string & $body, array $tagsList, string|array $formatCallback, boolean $isNeedTranslateAttributes )
Prepare simple tags |
private
boolean|integer
|
|
protected
|
|
public
boolean
|
|
public
|
protected
string
|
$_tokenRegex | '\{\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\}' |
#
Regular Expression for detected and replace translate |
protected
string
|
$_content |
|
#
Response body or JSON content string |
protected
boolean
|
$_isAllowed |
|
#
Is enabled and allowed inline translates flags |
protected
boolean
|
$_isScriptInserted | false |
#
Flag about inserted styles and scripts for inline translates |
protected
boolean
|
$_isJson | false |
#
Current content is JSON or Response body |
protected
integer
|
$_maxTranslateBlocks | 7 |
#
Get max translate block in same tag |
protected
array
|
$_allowedTagsGlobal | array(
'script' => 'String in Javascript',
'title' => 'Page title',
) |
#
List of global tags |
protected
array
|
$_allowedTagsSimple | array(
'legend' => 'Caption for the fieldset element',
'label' => 'Label for an input element.',
'button' => 'Push button',
'a' => 'Link label',
'b' => 'Bold text',
'strong' => 'Strong emphasized text',
'i' => 'Italic text',
'em' => 'Emphasized text',
'u' => 'Underlined text',
'sup' => 'Superscript text',
'sub' => 'Subscript text',
'span' => 'Span element',
'small' => 'Smaller text',
'big' => 'Bigger text',
'address' => 'Contact information',
'blockquote' => 'Long quotation',
'q' => 'Short quotation',
'cite' => 'Citation',
'dt' => 'Item in a definition list',
'dd' => 'Item description in a definition list.',
'caption' => 'Table caption',
'th' => 'Header cell in a table',
'abbr' => 'Abbreviated phrase',
'acronym' => 'An acronym',
'var' => 'Variable part of a text',
'dfn' => 'Term',
'strike' => 'Strikethrough text',
'del' => 'Deleted text',
'ins' => 'Inserted text',
'h1' => 'Heading level 1',
'h2' => 'Heading level 2',
'h3' => 'Heading level 3',
'h4' => 'Heading level 4',
'h5' => 'Heading level 5',
'h6' => 'Heading level 6',
'p' => 'Paragraph',
'pre' => 'Preformatted text',
'center' => 'Centered text',
'select' => 'List options',
) |
#
List of simple tags |