st

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

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

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

Жёстко запрограммированная функция, являющаяся эквивалентом функции t() в ходе инсталляции, когда база данных, тема и система локализации возможно ещё не доступны.

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

default_profile_tasks 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
Проверяет, можем ли мы подключиться к MySQL.
drupal_test_mysqli in includes/install.mysqli.inc
Проверяет возможность подключения к MySQL.
drupal_test_pgsql in includes/install.pgsql.inc
Проверяет возможность соединения с 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
Check installation requirements and report any errors.
install_configure_form in ./install.php
Form API array definition for site configuration.
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_no_profile_error in ./install.php
Show an error page when there are no profiles available.
install_select_locale in ./install.php
Allow admin to select which locale to use for the current profile.
install_select_locale_form in ./install.php
Form API array definition for language selection.
install_select_profile in ./install.php
Allow admin to select which profile to install.
install_select_profile_form in ./install.php
Form API array definition for the profile selection form.
install_settings_form in ./install.php
Form API array definition for install_settings.
install_tasks in ./install.php
Tasks performed after the database is initialized.
install_task_list in ./install.php
Add the installation task list to the current page.
theme_install_page in includes/theme.maintenance.inc
Generate a themed installation page.
_install_module_batch in ./install.php
Batch callback for batch installation of modules.
_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 .'/translations/'. $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';
  // 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);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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