You are here

function cmfcCalendarV1::getAllStrings in Calendar Systems 8

Same name and namespace in other branches
  1. 8.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::getAllStrings()
  2. 7 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::getAllStrings()
  3. 7.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::getAllStrings()

* Get list of translatable strings

File

calendar/v1/calendarV1.class.inc.php, line 395

Class

cmfcCalendarV1

Code

function getAllStrings() {
  $plugins = $this
    ->getPlugins();
  $strings = array();
  foreach ($plugins as $plugin) {
    $calendar = self::factory($plugin);
    $_strings = $calendar
      ->getStrings();
    if (isset($_strings['meridiemsName'])) {
      foreach ($_strings['meridiemsName'] as $num => $var) {
        $_strings['meridiemsName'][$num][0] = $_strings['meridiemsName'][$num]['am'];
        $_strings['meridiemsName'][$num][1] = $_strings['meridiemsName'][$num]['pm'];
        unset($_strings['meridiemsName'][$num]['am']);
        unset($_strings['meridiemsName'][$num]['pm']);
      }
    }
    if (isset($_strings['meridiemsShortName'])) {
      foreach ($_strings['meridiemsShortName'] as $num => $var) {
        $_strings['meridiemsShortName'][$num][0] = $_strings['meridiemsShortName'][$num]['am'];
        $_strings['meridiemsShortName'][$num][1] = $_strings['meridiemsShortName'][$num]['pm'];
        unset($_strings['meridiemsShortName'][$num]['am']);
        unset($_strings['meridiemsShortName'][$num]['pm']);
      }
    }
    $strings = array_merge_recursive($strings, $_strings);
  }
  return $strings;
}