use a custom textgroup from t() I've defined my own textgroup using:

function foo_locale($op = 'groups') {
  switch ($op) {
    case 'groups':
      return array('foo' =&gt; t('foo strings'));
  }
}


The problem is that when I use t('bar') in a template, the entry generated in the database (e.g when viewing the template in /fr) is associated with the default textgroup. This doesn't allow me to use the foo textgroup I've previously defined, thus all my custom strings are mixed with the other "Built-in interface" ones.

How can I solve this?
t('String') always belongs to the "Built-in interface". If you have t() texts, then you don't need to create textgroups.

They are meant for strings that are not translated with that function, usually content/configuration. The I18n modules define lots of these groups for things like variables, menus, taxonomy terms and so on.