Index: token.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/token/token.module,v
retrieving revision 1.7.4.30
diff -u -r1.7.4.30 token.module
--- token.module	9 Jul 2010 17:27:48 -0000	1.7.4.30
+++ token.module	15 Jul 2010 03:14:52 -0000
@@ -240,11 +240,17 @@
  *   of tokens in a single execution cycle. Flushing it will
  *   keep them from burning through memory.
  *   The default is FALSE.
+ * @param options
+ *   (optional) A keyed array of settings and flags to control the token
+ *   replacement process. Supported options are:
+ *   - language: A language object to be used when generating locale-sensitive
+ *     tokens.
  * @return
  *   A keyed array containing the substitution tokens and the substitution
  *   values for the passed-in type and object.
  */
 function token_get_values($type = 'global', $object = NULL, $flush = FALSE, $options = array()) {
+  global $language;
   static $tokens;
   static $running;
 
@@ -277,22 +283,29 @@
 
   token_include();
 
+  if (isset($options['language'])) {
+    $lang = $options['language']->language;
+  }
+  else {
+    $lang = $language->language;
+  }
+
   $id = _token_get_id($type, $object);
-  if ($id && isset($tokens[$type][$id])) {
-    $tmp_tokens = $tokens[$type][$id];
+  if ($id && isset($tokens[$lang][$type][$id])) {
+    $tmp_tokens = $tokens[$lang][$type][$id];
   }
   else {
     $tmp_tokens = module_invoke_all('token_values', $type, $object, $options);
-    $tokens[$type][$id] = $tmp_tokens;
+    $tokens[$lang][$type][$id] = $tmp_tokens;
   }
 
   // Special-case global tokens, as we always want to be able to process
   // those substitutions.
-  if (!isset($tokens['global']['default'])) {
-    $tokens['global']['default'] = module_invoke_all('token_values', 'global');
+  if (!isset($tokens[$lang]['global']['default'])) {
+    $tokens[$lang]['global']['default'] = module_invoke_all('token_values', 'global');
   }
 
-  $all = _token_array_merge($tokens['global']['default'], $tokens[$type][$id]);
+  $all = _token_array_merge($tokens[$lang]['global']['default'], $tokens[$lang][$type][$id]);
 
   $result = new stdClass();
   $result->tokens = array_keys($all);
