ECMAScript 2021: Another proposal for Internationalization API Specification completed

Also in September the TC39 voted on some new features for ECMAScript. At level 4, however, only one proposal for internationalization made it this time. Stage 3 also gathers more and more interesting candidates for the upcoming versions of JavaScript.

A new version of ECMAScript appears every year. In advance, the TC39, the technical committee behind the language, decides which new features are ready for the next version. Five features have already been set for ECMAScript 2021, including the separator characters for large numbers in the code and Promise.any. There are also news for ECMAScript 2021 from the September meeting that took place last week.

New ECMAScript API for internationalization

A new addition for ECMAScript 2021 is a proposal that extends the Internationalization API Specification of the language. Intl.DisplayNamesStage 4 was set for the September meeting . This is an addition to the existing options for working with translations. The main goal of the new API is to reduce the download size of internationalized content. With Intl.DisplayNamescan therefore by API ready to resort translations. For example, display names of scripts, region names and language names are made available. In addition to reducing the download size, the translation costs should also be reduced and a standardized designation should be brought about.

Like in Python, soon in JavaScript?

Step 3 in the ECMAScript process has now also .item()been reached. The proposal wants to introduce a function analogous to Pythons arr[-1]that arr[arr.length-1]can be used instead of . Currently, JavaScript arr[-1]reports -1 for the property; Instead, however, the desire was often expressed to implement a behavior analogous to Python, where starting from the last element, counting backwards in negative numbers. With .item()an analog option in ECMAScript is to be introduced now that the proposal text is described in detail. Stage 3 means that the idea will now be implemented in the various ECMAScript implementations on a test basis. As soon as all the problems that arise have been resolved, the API can move to Stage 4 and is then done.

Leave a Reply