# Any Idea about support \`Intl.CounterFormat\`

**URL:** <https://es.discourse.group/t/any-idea-about-support-intl-counterformat/1551>\
**Category:** 💡 Ideas\
**Tags:** proposal\
**Created:** [December 12, 2022, 6:02am UTC](https://es.discourse.group/t/any-idea-about-support-intl-counterformat/1551 "2022-12-12T06:02:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleen42](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aleen42/32/461_2.png) [@aleen42](https://es.discourse.group/u/aleen42)\
**Post date:** [December 12, 2022, 6:02am UTC](https://es.discourse.group/t/any-idea-about-support-intl-counterformat/1551/1 "2022-12-12T06:02:46Z")

</div>

As we know, the W3C has introduced an extended [`CSS Counter Styles`](https://www.w3.org/TR/css-counter-styles-3/) in CSS3, and for the compatibility to simulate it in JavaScript, we may need such an API like what [`@jsamr/counter-style`](https://github.com/jsamr/react-native-li/tree/master/packages/counter-style) has done for us. I think such an implementation can be done in the native specification of JavaScript, and any idea?

```nohighlight
const formatter1 = new Intl.CounterFormat('decimal');
console.log(formatter1.format(1)); // => "1."

const formatter2 = new Intl.CounterFormat('lower-roman');
console.log(formatter2.format(1)); // => "i."

const formatter3 = new Intl.CounterFormat('lower-alpha');
console.log(formatter3.format(1)); // => "a."

const formatter4 = new Intl.CounterFormat('simp-chinese-informal');
console.log(formatter4.format(1)); // => "一、"

```

---

<div class="post-metadata">

**Author:** ![aleen42](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aleen42/32/461_2.png) [@aleen42](https://es.discourse.group/u/aleen42)\
**Post date:** [December 12, 2022, 10:34am UTC](https://es.discourse.group/t/any-idea-about-support-intl-counterformat/1551/2 "2022-12-12T10:34:36Z")

</div>

If anyone is interested in this, I would like to draft a proposal for this.

---

<div class="post-metadata">

**Author:** ![aleen42](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aleen42/32/461_2.png) [@aleen42](https://es.discourse.group/u/aleen42)\
**Post date:** [May 6, 2023, 5:32am UTC](https://es.discourse.group/t/any-idea-about-support-intl-counterformat/1551/3 "2023-05-06T05:32:04Z")

</div>

REF: [GitHub - aleen42/proposal-intl-counter-format: A proposal for supporting `Intl.CounterFormat`](https://github.com/aleen42/proposal-intl-counter-format)
