[FLOW3-general] Problem with l10n?

Christian Lerrahn (Cerebrum) christian.lerrahn at cerebrum.com.au
Wed Jan 12 08:23:29 CET 2011


Hi,
I suspect that this is not a bug but a configuration problem. So, I've
decided to post it here instead of putting it on the bug tracker.

I have a model which used to work ok. However, now that localisation is
used in the validators, I see an exception

#1280218995: Number format was not found. Please check whether CLDR repository is valid. 

The relevant info, I suppose is

43 F3\FLOW3\I18n\Cldr\Reader\NumbersReader::parseFormatFromCldr(F3\FLOW3\I18n\Locale, "decimal", "default")

Packages/Framework/FLOW3/Classes/I18n/Parser/NumberParser.php:
00089:  public function parseDecimalNumber($numberToParse, \F3\FLOW3\I18n\Locale $locale, $formatLength = \F3\FLOW3\I18n\Cldr\Reader\NumbersReader::FORMAT_LENGTH_DEFAULT, $strictMode = TRUE) {
00090:   \F3\FLOW3\I18n\Cldr\Reader\NumbersReader::validateFormatLength($formatLength);
00091:   return $this->doParsingWithParsedFormat($numberToParse, $this->numbersReader->parseFormatFromCldr($locale, \F3\FLOW3\I18n\Cldr\Reader\NumbersReader::FORMAT_TYPE_DECIMAL, $formatLength), $this->numbersReader->getLocalizedSymbolsForLocale($locale), $strictMode);
00092:  }
00093: 


42 F3\FLOW3\I18n\Parser\NumberParser::parseDecimalNumber("1234", F3\FLOW3\I18n\Locale, "default", boolean)

Packages/Framework/FLOW3/Classes/Validation/Validator/NumberValidator.php:
00112:    } else return TRUE;
00113:   } else {
00114:    if ($this->numberParser->parseDecimalNumber($value, $locale, $formatLength, $strictMode) === FALSE) {
00115:     $this->addError('A valid decimal number is expected.', 1281452094);
00116:    } else return TRUE;

This looks like a number format for the "default" locale is looked up but not
found. However, the CLDR in FLOW3 does seem to know "default" as a key and therefore
I would expect this to work? What am I doing wrong? Do I need configuration for the
localisation? I'm using the current version from git.

Cheers,
Christian


More information about the FLOW3-general mailing list