Feature #7722

Implement CLDR data reader

Added by Karol Gusak over 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
I18n
Start date:
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

CLDR data contains information in XML format about many different aspects related to localization. FLOW3 18n / l10n subsystem will use following parts of this data:

  • Plural forms - what plural forms exists in a language (zero, one, few, many, other) and how quantity relates to them
  • Numbers - how to represent decimal numbers, big numbers etc
  • Currencies - how values are formatted
  • Date and time - short, medium and full formatting of dates and time

Parsing for all of these data types needs to be written separately, as they have not much in common (except all of them are represented in XML format).


Related issues

Related to TYPO3.Flow - Feature #6724: Internationalization, locale, multi-language ect.ResolvedKarol Gusak

Actions
#1

Updated by Karol Gusak over 11 years ago

  • Status changed from New to Accepted
  • % Done changed from 0 to 30

Basic classes for CLDR are done. There is CLDRModel which represents data from one CLDR file, and HierarchicalCLDRModel which contains a number of related models. All is cached, so most of the time the CLDR files will not be even parsed. CLDRRepository is used to retrieve models.

A hierarchy implementation in HierarchicalCLDRModel is very simple but I think it will be sufficient (please see class description).

#2

Updated by Karol Gusak over 11 years ago

  • % Done changed from 30 to 60

PluralsReader and NumbersReader are done.

Parsing of plurals rules as in UTS 35 - Language Plural Rules
Parsing of number formats as in UTS 35 - Number Format Patterns

NumbersReader does not implement 100% of the specification. Some features are missing as they complicate things a lot. But most important syntax is supported.

BTW: Commit didn't show up on the tracker, I'm not sure why.

#3

Updated by Karol Gusak over 11 years ago

  • % Done changed from 60 to 90

DatesReader implemented.

Date and time format syntax: Date Format Patterns

DatesReader also doesn't implement 100% of specification, but most important part is supported. See the documentation for DatesReader class for details.

#4

Updated by Karol Gusak about 11 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 90 to 100

After many minor and major rewrites the Reader classes look like I think they should ;-).

#5

Updated by Karsten Dambekalns about 11 years ago

  • Target version set to 1.0 alpha 11

Also available in: Atom PDF