Automated translation of interface Long story short: I'm looking for a way to provide translations... the "hard" way. So I don't want to click in the backend to apply new translations or translate it on the "Translate Interface" Page.

I really want to provide it hard coded, and when it's changed, it should get changed in the backend as well.
Since you don't want to use the user interface, the only way to provide a translation of the string used from modules is to set them in the settings.php file.

$conf['locale_custom_strings_it'][''] = array(
  'forum' =&gt; 'Tavola di discussione',
  '@count min' =&gt; '@count minuti',
);


Replace "it" with language code for which you want to provide the translation. The array index is the string in English, while the array value is the translated string.

Using this method is pretty hard: Each times a new string is translated, the settings.php needs to be edited. There could be also some performance issues, as you are defining a new array row for every new translation; I let you imagine what happens when you have 1000 strings to translate in 5 languages.

When those values are provided, the database is not anymore looked up, as t() contains the following code. (See the first comment.)

  // First, check for an array of customized strings. If present, use the array
  // *instead of* database lookups. This is a high performance way to provide a
  // handful of string replacements. See settings.php for examples.
  // Cache the $custom_strings variable to improve performance.
  if (!isset($custom_strings[$options['langcode']])) {
    $custom_strings[$options['langcode']] = variable_get('locale_custom_strings_' . $options['langcode'], array());
  }
  // Custom strings work for English too, even if locale module is disabled.
  if (isset($custom_strings[$options['langcode']][$options['context']][$string])) {
    $string = $custom_strings[$options['langcode']][$options['context']][$string];
  }
  // Translate with locale module if enabled.
  elseif ($options['langcode'] != 'en' &amp;&amp; function_exists('locale')) {
    $string = locale($string, $options['context'], $options['langcode']);
  }
  if (empty($args)) {
    return $string;
  }
  else {
    return format_string($string, $args);
  }