core/domain/services/admin/events/editor/AdvancedEditorData.php 1 location
|
@@ 635-655 (lines=21) @@
|
| 632 |
|
* @param string $domain Translation domain. |
| 633 |
|
* @return array |
| 634 |
|
*/ |
| 635 |
|
public static function getJedLocaleData($domain) |
| 636 |
|
{ |
| 637 |
|
$translations = get_translations_for_domain($domain); |
| 638 |
|
|
| 639 |
|
$locale = array( |
| 640 |
|
'' => array( |
| 641 |
|
'domain' => $domain, |
| 642 |
|
'lang' => is_admin() ? EEH_DTT_Helper::get_user_locale() : get_locale() |
| 643 |
|
), |
| 644 |
|
); |
| 645 |
|
|
| 646 |
|
if (! empty($translations->headers['Plural-Forms'])) { |
| 647 |
|
$locale['']['plural_forms'] = $translations->headers['Plural-Forms']; |
| 648 |
|
} |
| 649 |
|
|
| 650 |
|
foreach ($translations->entries as $msgid => $entry) { |
| 651 |
|
$locale[ $msgid ] = $entry->translations; |
| 652 |
|
} |
| 653 |
|
|
| 654 |
|
return $locale; |
| 655 |
|
} |
| 656 |
|
} |
| 657 |
|
|
core/services/assets/I18nRegistry.php 1 location
|
@@ 232-252 (lines=21) @@
|
| 229 |
|
* @param string $domain Translation domain. |
| 230 |
|
* @return array |
| 231 |
|
*/ |
| 232 |
|
private function getJedLocaleData($domain) |
| 233 |
|
{ |
| 234 |
|
$translations = get_translations_for_domain($domain); |
| 235 |
|
|
| 236 |
|
$locale = array( |
| 237 |
|
'' => array( |
| 238 |
|
'domain' => $domain, |
| 239 |
|
'lang' => is_admin() ? EEH_DTT_Helper::get_user_locale() : get_locale() |
| 240 |
|
), |
| 241 |
|
); |
| 242 |
|
|
| 243 |
|
if (! empty($translations->headers['Plural-Forms'])) { |
| 244 |
|
$locale['']['plural_forms'] = $translations->headers['Plural-Forms']; |
| 245 |
|
} |
| 246 |
|
|
| 247 |
|
foreach ($translations->entries as $msgid => $entry) { |
| 248 |
|
$locale[$msgid] = $entry->translations; |
| 249 |
|
} |
| 250 |
|
|
| 251 |
|
return $locale; |
| 252 |
|
} |
| 253 |
|
} |