[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search

CLDR Ticket #9993(new data)

Opened 15 months ago

Last modified 2 months ago

Add placeholder patterns for form fields

Reported by: zbraniecki@… Owned by: anybody
Component: supplemental Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:


Many form widgets need a placeholder pattern, examples:

  • Date field "dd/mm/yyyy"
  • Time field "--:-- --"
  • Credit card CCV field
  • Credit card month/year fields "mm/yy"

Those fields should be localized and should not use english-driven letter patterns like "yyyy" to indicate 4 digit year.

For examples of the design where such placeholders would be useful see: https://mozilla.invisionapp.com/share/GU7VBIB4D#/screens/171580933

It would be great to unify how we display those placeholders across systems to increase the ability of the user to recognize the meaning of the placeholder and reduce inconsistency between apps/systems.

CLDR seems like a perfect place to standardize those placeholder patterns for form fields accross systems.


Change History

comment:1 Changed 2 months ago by mark

Unclear to me what exactly is being asked for, for the date patterns. An implementation can find out that what the preferred pattern is for the skeleton yMMdd is (say "yyyy-MM-dd") and then use that to create a widget. But I don't think that's what is being requested. Can you explain a bit more about the use case?

(Not clear where CCVs would enter in, either).

comment:2 Changed 2 months ago by zbraniecki@…

I'm asking for a placeholder pattern.

When the widget is supposed to handle date, like "yyyy-mm-dd" each locale will show a different placeholder pattern that hints which field is which.

For example, en-US may show "MM/DD" for month/date (common for credit cards), but a russian locale wouldn't use letters "M" and "D" here.

Many locales will probably use first letters of words describing the field (m - month, d - day, y - year) but not all of them, and even in English I'm not sure if it should be "--:--" or "HH:MM" for hour/minute.

Does it make more sense?

comment:3 Changed 2 months ago by mark

Ah, you don't mean internal placeholders, but rather a user-visible string that is a shorthand to the user for what goes in each field. That's clear now.

That might be done by having an alternate name for each of the skeletons, something like:

<field type="year">


<displayName type='yy'>JJ</displayName>


<field type="month">

<displayName type='MM'>MM</displayName>
<displayName type='MMM'>MMM</displayName>

Then the patterns can be used to compose the overall user-visible string, based on the skeleton used to generate the pattern for formatting/parsing.

We'd need a fleshed out proposal for exactly how this would work.

comment:4 Changed 2 months ago by mark

Could be

<displayName type='hh'>--</displayName>


Add a comment

Modify Ticket

as new

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.