Contributions API

i18nprofile_locale_refresh

Definition

i18nprofile_locale_refresh()
contributions/i18n/i18nprofile/i18nprofile.module, line 39

Description

Refresh strings

Code

<?php
function i18nprofile_locale_refresh() {
  $result = db_query('SELECT * FROM {profile_fields}');
  $categories = array();
  while ($field = db_fetch_object($result)) {
    // Store strings to translate: title, explanation, options
    to("profile:field:$field->name", $field, array('title', 'explanation', 'options'), NULL, TRUE);
    // Store category if not there yet
    if (!isset($categories[$field->category])) {
      tt("profile:category", $field->category, NULL, TRUE);
      $categories[$field->category] = 1;
    }    
  }  
}
?>