Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-translation
Model
Js
Config.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Translation\Model\Js
;
7
8
use
Magento\Framework\Translate\Js\Config
as FrameworkJsConfig;
9
use
Magento\Framework\App\Config\ScopeConfigInterface
;
10
14
class
Config
extends
FrameworkJsConfig
15
{
19
const
NO_TRANSLATION
=
'none'
;
20
24
const
EMBEDDED_STRATEGY
=
'embedded'
;
25
29
const
DICTIONARY_STRATEGY
=
'dictionary'
;
30
34
const
XML_PATH_STRATEGY
=
'dev/js/translate_strategy'
;
35
39
const
DICTIONARY_FILE_NAME
=
'js-translation.json'
;
40
46
protected
$scopeConfig
;
47
53
protected
$patterns
;
54
59
public
function
__construct
(
ScopeConfigInterface
$scopeConfig
, array
$patterns
)
60
{
61
$this->scopeConfig =
$scopeConfig
;
62
$this->patterns =
$patterns
;
63
parent::__construct(
64
$this->scopeConfig->getValue(self::XML_PATH_STRATEGY) ==
self::DICTIONARY_STRATEGY
,
65
self::DICTIONARY_FILE_NAME
66
);
67
}
68
74
public
function
isEmbeddedStrategy
()
75
{
76
return
($this->scopeConfig->getValue(self::XML_PATH_STRATEGY) ==
self::EMBEDDED_STRATEGY
);
77
}
78
84
public
function
dictionaryEnabled
()
85
{
86
return
($this->scopeConfig->getValue(self::XML_PATH_STRATEGY) ==
self::DICTIONARY_STRATEGY
);
87
}
88
94
public
function
getPatterns
()
95
{
96
return
$this->patterns
;
97
}
98
}
Magento\Translation\Model\Js
Magento\Translation\Model\Js\Config\dictionaryEnabled
dictionaryEnabled()
Definition:
Config.php:84
Magento\Translation\Model\Js\Config\XML_PATH_STRATEGY
const XML_PATH_STRATEGY
Definition:
Config.php:34
Magento\Translation\Model\Js\Config\DICTIONARY_STRATEGY
const DICTIONARY_STRATEGY
Definition:
Config.php:29
Magento\Translation\Model\Js\Config
Definition:
Config.php:14
Magento\Translation\Model\Js\Config\EMBEDDED_STRATEGY
const EMBEDDED_STRATEGY
Definition:
Config.php:24
Magento\Translation\Model\Js\Config\isEmbeddedStrategy
isEmbeddedStrategy()
Definition:
Config.php:74
Magento\Translation\Model\Js\Config\NO_TRANSLATION
const NO_TRANSLATION
Definition:
Config.php:19
Magento\Translation\Model\Js\Config\__construct
__construct(ScopeConfigInterface $scopeConfig, array $patterns)
Definition:
Config.php:59
Magento\Framework\Translate\Js\Config
Definition:
Config.php:11
Magento\Translation\Model\Js\Config\getPatterns
getPatterns()
Definition:
Config.php:94
Magento\Translation\Model\Js\Config\$patterns
$patterns
Definition:
Config.php:53
Magento\Translation\Model\Js\Config\DICTIONARY_FILE_NAME
const DICTIONARY_FILE_NAME
Definition:
Config.php:39
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15
Magento\Translation\Model\Js\Config\$scopeConfig
$scopeConfig
Definition:
Config.php:46