Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Structures | |
class | InlineTest |
Public Member Functions | |
__construct (\Magento\Framework\View\DesignInterface $viewDesign, \Magento\Framework\Cache\FrontendInterface $cache, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\Module\ModuleList $moduleList, \Magento\Framework\Module\Dir\Reader $modulesReader, \Magento\Framework\App\ScopeResolverInterface $scopeResolver, \Magento\Framework\Translate\ResourceInterface $translate, \Magento\Framework\Locale\ResolverInterface $locale, \Magento\Framework\App\State $appState, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\App\RequestInterface $request, \Magento\Framework\File\Csv $csvParser, \Magento\Framework\App\Language\Dictionary $packDictionary, DriverInterface $fileDriver=null) | |
loadData ($area=null, $forceReload=false) | |
getData () | |
getLocale () | |
setLocale ($locale) | |
getTheme () | |
Data Fields | |
const | CONFIG_AREA_KEY = 'area' |
const | CONFIG_LOCALE_KEY = 'locale' |
const | CONFIG_SCOPE_KEY = 'scope' |
const | CONFIG_THEME_KEY = 'theme' |
const | CONFIG_MODULE_KEY = 'module' |
![]() | |
const | DEFAULT_STRING = 'Translate String' |
Protected Member Functions | |
setConfig ($config) | |
getScope () | |
getConfig ($key) | |
getControllerModuleName () | |
_loadModuleTranslation () | |
loadModuleTranslationByModulesList (array $modules) | |
_addData ($data) | |
_loadThemeTranslation () | |
_loadPackTranslation () | |
_loadDbTranslation () | |
_getModuleTranslationFile ($moduleName, $locale) | |
_getThemeTranslationFile ($locale) | |
_getFileData ($file) | |
getCacheId () | |
_loadCache () | |
_saveCache () | |
Translate library
@SuppressWarnings(PHPMD.CouplingBetweenObjects) @SuppressWarnings(PHPMD.TooManyFields)
Definition at line 20 of file Translate.php.
__construct | ( | \Magento\Framework\View\DesignInterface | $viewDesign, |
\Magento\Framework\Cache\FrontendInterface | $cache, | ||
\Magento\Framework\View\FileSystem | $viewFileSystem, | ||
\Magento\Framework\Module\ModuleList | $moduleList, | ||
\Magento\Framework\Module\Dir\Reader | $modulesReader, | ||
\Magento\Framework\App\ScopeResolverInterface | $scopeResolver, | ||
\Magento\Framework\Translate\ResourceInterface | $translate, | ||
\Magento\Framework\Locale\ResolverInterface | $locale, | ||
\Magento\Framework\App\State | $appState, | ||
\Magento\Framework\Filesystem | $filesystem, | ||
\Magento\Framework\App\RequestInterface | $request, | ||
\Magento\Framework\File\Csv | $csvParser, | ||
\Magento\Framework\App\Language\Dictionary | $packDictionary, | ||
DriverInterface | $fileDriver = null |
||
) |
\Magento\Framework\View\DesignInterface | $viewDesign | |
\Magento\Framework\Cache\FrontendInterface | $cache | |
\Magento\Framework\View\FileSystem | $viewFileSystem | |
\Magento\Framework\Module\ModuleList | $moduleList | |
\Magento\Framework\Module\Dir\Reader | $modulesReader | |
\Magento\Framework\App\ScopeResolverInterface | $scopeResolver | |
\Magento\Framework\Translate\ResourceInterface | $translate | |
\Magento\Framework\Locale\ResolverInterface | $locale | |
\Magento\Framework\App\State | $appState | |
\Magento\Framework\Filesystem | $filesystem | |
\Magento\Framework\App\RequestInterface | $request | |
\Magento\Framework\File\Csv | $csvParser | |
\Magento\Framework\App\Language\Dictionary | $packDictionary | |
DriverInterface | null | $fileDriver | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 149 of file Translate.php.
|
protected |
Adding translation data
array | $data |
Definition at line 323 of file Translate.php.
|
protected |
Retrieve data from file
string | $file |
Definition at line 412 of file Translate.php.
|
protected |
Retrieve translation file for module
string | $moduleName | |
string | $locale |
Definition at line 385 of file Translate.php.
|
protected |
Retrieve translation file for theme
string | $locale |
Definition at line 398 of file Translate.php.
|
protected |
|
protected |
|
protected |
Load data from module translation files
Definition at line 292 of file Translate.php.
|
protected |
Load translation dictionary from language packages
Definition at line 360 of file Translate.php.
|
protected |
Load current theme translation
Definition at line 346 of file Translate.php.
|
protected |
Saving data cache
Definition at line 512 of file Translate.php.
|
protected |
Retrieve cache identifier
Definition at line 480 of file Translate.php.
|
protected |
Retrieve config value by key
string | $key |
Definition at line 270 of file Translate.php.
|
protected |
getData | ( | ) |
Retrieve translation data
Implements TranslateInterface.
Definition at line 427 of file Translate.php.
getLocale | ( | ) |
Retrieve locale
Implements TranslateInterface.
Definition at line 440 of file Translate.php.
|
protected |
getTheme | ( | ) |
Retrieve theme code
Implements TranslateInterface.
Definition at line 466 of file Translate.php.
loadData | ( | $area = null , |
|
$forceReload = false |
|||
) |
Initialize translation data
string | null | $area | |
bool | $forceReload |
Implements TranslateInterface.
Definition at line 197 of file Translate.php.
|
protected |
Load data from module translation files by list of modules
array | $modules |
Definition at line 308 of file Translate.php.
|
protected |
Initialize configuration
array | $config |
Definition at line 235 of file Translate.php.
setLocale | ( | $locale | ) |
Set locale
string | $locale |
Implements TranslateInterface.
Definition at line 454 of file Translate.php.
|
protected |
Definition at line 99 of file Translate.php.
|
protected |
Definition at line 64 of file Translate.php.
|
protected |
Definition at line 47 of file Translate.php.
|
protected |
Definition at line 40 of file Translate.php.
|
protected |
Definition at line 114 of file Translate.php.
|
protected |
Definition at line 54 of file Translate.php.
|
protected |
Definition at line 94 of file Translate.php.
|
protected |
Definition at line 33 of file Translate.php.
|
protected |
Definition at line 74 of file Translate.php.
|
protected |
Definition at line 79 of file Translate.php.
|
protected |
Definition at line 84 of file Translate.php.
|
protected |
Definition at line 89 of file Translate.php.
|
protected |
Definition at line 59 of file Translate.php.
|
protected |
Definition at line 69 of file Translate.php.
|
protected |
Definition at line 104 of file Translate.php.
|
protected |
Definition at line 119 of file Translate.php.
|
protected |
Definition at line 109 of file Translate.php.
const CONFIG_AREA_KEY = 'area' |
Definition at line 22 of file Translate.php.
const CONFIG_LOCALE_KEY = 'locale' |
Definition at line 23 of file Translate.php.
const CONFIG_MODULE_KEY = 'module' |
Definition at line 26 of file Translate.php.
const CONFIG_SCOPE_KEY = 'scope' |
Definition at line 24 of file Translate.php.
const CONFIG_THEME_KEY = 'theme' |
Definition at line 25 of file Translate.php.