uc_order.i18n.inc 712 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * Implementation of i18n hooks for Ubercart orders.
  5. */
  6. /**
  7. * Implements hook_i18n_string_info().
  8. */
  9. function uc_order_i18n_string_info() {
  10. $groups['uc_order_status'] = array(
  11. 'title' => t('Ubercart order status'),
  12. 'description' => t('Translatable Ubercart order statuses'),
  13. 'format' => FALSE,
  14. 'list' => TRUE,
  15. );
  16. return $groups;
  17. }
  18. /**
  19. * Refreshes translated order statuses.
  20. */
  21. function uc_order_i18n_string_refresh() {
  22. $statuses = db_query("SELECT order_status_id, title FROM {uc_order_statuses}");
  23. foreach ($statuses as $status) {
  24. i18n_string_update('uc_order_status:status:' . $status->order_status_id . ':title', $status->title);
  25. }
  26. return TRUE;
  27. }