Browse Source

Added comment for a piece of confusing code

Jose Lorenzo Rodriguez 11 years ago
parent
commit
9e1a5323b8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/Utility/Number.php

+ 4 - 0
src/Utility/Number.php

@@ -280,6 +280,10 @@ class Number {
 		}
 
 		if (!empty($options['useIntlCode'])) {
+			// One of the odd things about ICU is that the currency marker in patterns
+			// is denoted with ¤, whereas the international code is marked with ¤¤,
+			// in order to use the code we need to simply duplicate the character wherever
+			// it appears in the pattern.
 			$pattern = trim(str_replace('¤', '¤¤ ', $formatter->getPattern()));
 			$formatter->setPattern($pattern);
 		}