st

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/install.inc, строка 582

Версии
5 – 6
st($string, $args = array())

Жёстко запрограммированная функция, являющаяся эквивалентом функции theme('placeholder'), когда система темизации не доступна.

▾ 23 функции вызывают st()

default_profile_final in profiles/default/default.profile
Perform any final installation tasks for this profile.
drupal_rewrite_settings in includes/install.inc
Read settings.php into a buffer line by line, changing values specified in $settings array, then over-writing the old settings.php file.
drupal_test_mysql in includes/install.mysql.inc
Check if we can connect to MySQL.
drupal_test_mysqli in includes/install.mysqli.inc
Check if we can connect to MySQL.
drupal_test_pgsql in includes/install.pgsql.inc
Check if we can connect to PostgreSQL.
drupal_verify_profile in includes/install.inc
Verify a profile for installation.
example_form in ./example.profile
Form API array definition for the example form.
example_profile_tasks in ./example.profile
Perform any final installation tasks for this profile.
example_profile_task_list in ./example.profile
Return a list of tasks that this profile supports.
install_already_done_error in ./install.php
Show an error page when Drupal has already been installed.
install_change_settings in ./install.php
Configure and rewrite settings.php.
install_check_requirements in ./install.php
Page to check installation requirements and report any errors.
install_complete in ./install.php
Page displayed when the installation is complete. Called from install.php.
install_main in ./install.php
The Drupal installation happens in a series of steps. We begin by verifying that the current environment meets our minimum requirements. We then go on to verify that settings.php is properly configured. From there we connect to the configured database...
install_missing_modules_error in ./install.php
Show an error page when Drupal is missing required modules.
install_no_profile_error in ./install.php
Show an error page when there are no profiles available.
install_select_locale in ./install.php
Find all .po files for the current profile and allow admin to select which to use.
install_select_locale_form in ./install.php
install_select_profile in ./install.php
Find all .profile files and allow admin to select which to install.
install_select_profile_form in ./install.php
install_settings_form in ./install.php
Form API array definition for install_settings.
theme_install_page in includes/theme.inc
_install_settings_form_validate in ./install.php
Helper function for install_settings_validate.

Код

<?php
function st($string, $args = array()) {
  static $locale_strings = NULL;
  global $profile, $install_locale;

  if (!isset($locale_strings)) {
    $locale_strings = array();
    $filename = './profiles/' . $profile . '/' . $install_locale . '.po';
    if (file_exists($filename)) {
      require_once './includes/locale.inc';
      $file = (object) array('filepath' => $filename);
      _locale_import_read_po('mem-store', $file);
      $locale_strings = _locale_import_one_string('mem-report');
    }
  }

  require_once './includes/theme.inc';
  $GLOBALS['theme'] = 'theme';
  // Transform arguments before inserting them
  foreach ($args as $key => $value) {
    switch ($key[0]) {
      // Escaped only
      case '@':
        $args[$key] = check_plain($value);
        break;
      // Escaped and placeholder
      case '%':
      default:
        $args[$key] = '<em>'. check_plain($value) .'</em>';
        break;
      // Pass-through
      case '!':
    }
  }
  return strtr((!empty($locale_strings[$string]) ? $locale_strings[$string] : $string), $args);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему