14 \Magento\Framework\Translate\ResourceInterface
34 private $deployedConfig;
60 $this->
_init(
'translation',
'key_id');
75 $locale = (string) $locale;
77 $data = $this->getAppConfig()->get(
79 $locale .
'/' . $this->getStoreCode(
$storeId),
86 ->where(
'store_id IN (0 , :store_id)')
87 ->where(
'locale = :locale')
89 $bind = [
':locale' => $locale,
':store_id' =>
$storeId];
114 if (empty($strings)) {
121 ->where(
'string IN (?)', $strings)
122 ->where(
'store_id = :store_id');
144 if (!$this->getDeployedConfig()->isDbAvailable()) {
147 return parent::getConnection();
157 return $this->scopeResolver->getScope($this->scope)->getId();
166 private function getStoreCode(
$storeId)
168 return $this->scopeResolver->getScope(
$storeId)->getCode();
175 private function getDeployedConfig()
177 if ($this->deployedConfig ===
null) {
180 return $this->deployedConfig;
187 private function getAppConfig()
189 if ($this->appConfig ===
null) {
192 return $this->appConfig;
__construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\App\ScopeResolverInterface $scopeResolver, $connectionName=null, $scope=null)
_init($mainTable, $idFieldName)
getTranslationArray($storeId=null, $locale=null)
getTranslationArrayByStrings(array $strings, $storeId=null)