function st

7.x st($string, array $args = array(), array $options = array())
6.x st($string, $args = array())

Hardcoded function for doing the equivalent of t() during the install process, when database, theme, and localization system is possibly not yet available.

25 calls to st()
default_profile_tasks in drupal-6.x/profiles/default/default.profile
Perform any final installation tasks for this profile.
drupal_rewrite_settings in drupal-6.x/includes/
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 drupal-6.x/includes/
Check if we can connect to MySQL.
drupal_test_mysqli in drupal-6.x/includes/
Check if we can connect to MySQL.
drupal_test_pgsql in drupal-6.x/includes/
Check if we can connect to PostgreSQL.

... See full list

1 string reference to 'st'
get_t in drupal-6.x/includes/
Return the name of the localisation function. Use in code that needs to run both during installation and normal operation.


drupal-6.x/includes/, line 627


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/';
      $file = (object) array('filepath' => $filename);
      _locale_import_read_po('mem-store', $file);
      $locale_strings = _locale_import_one_string('mem-report');

  require_once './includes/';
  // Transform arguments before inserting them
  foreach ($args as $key => $value) {
    switch ($key[0]) {
      // Escaped only
      case '@':
        $args[$key] = check_plain($value);
        // Escaped and placeholder
      case '%':
        $args[$key] = '<em>' . check_plain($value) . '</em>';
        // Pass-through
      case '!':
  return strtr((!empty($locale_strings[$string]) ? $locale_strings[$string] : $string), $args);