Not all strings are translated With Drupal 7, we have a custom module that displays a form that will work in both English and Spanish. Throughout the form we used t() to translate the text, and it works in all but two places. One is in the form when we declare a fieldset, and the other is the menu entry declaration (which isn't using t()). For the menu entry we have '[SiteName] Events' like this:

$items['sitename-events/register'] = array(
    'title' =&gt; 'SiteName Events',
    'page callback' =&gt; 'sitename_events_event_register',
    'access arguments' =&gt; array('view events'),
    'file' =&gt; 'public.events.inc',
    'type' =&gt; MENU_NORMAL_ITEM,
);


For the form, the element is declared like this:

// Personal Information
$form['personal'] = array(
    '#type' =&gt; 'fieldset',
    '#title' =&gt; t('Personal Information'),
    '#collapsible' =&gt; FALSE,
    '#collapsed' =&gt; FALSE,
);


Other pages are translating just fine, as well as other elements in the form, including the other field sets. What would cause these two entries to not translate, and is there a way that I can force them to translate since we're only going to support English and Spanish?
The literal strings that are passed to t() are not directly translated from the function; the function just searches the provided string in the databases used from the Locale module ("locales_source" and "locales_target"; see locale()). Before searching in that databases, t() checks the Drupal variable locale_custom_strings_&lt;lang_code&gt;, where &lt;lang_code&gt; is the language code for the language to which the strings are translated.

In the first case, the strings are imported from the translation files. In the second case, the Drupal variable can be set in the settings.php file.

As you want to have the translation for strings used by a custom module, the first method (creating a .po file, and then importing it) is probably too laborious, especially because it's a custom module for which localize.drupal.org cannot provide the translation files (the ones with extension .po). The only alternative is to use code similar to the following one in the settings.php file:

$conf['locale_custom_strings_es'][''] = array(
  'forum'      =&gt; 'foro',
  '@count min' =&gt; '@count minudos',
);


The strings I used are just an example (I hope I translated the strings in Spanish correctly 
); the strings I used already have their translation in Spanish as part of the core translation.