angular icon indicating copy to clipboard operation
angular copied to clipboard

Supported locales

Open TomaszCz opened this issue 3 years ago • 3 comments

Description

https://github.com/angular/angular/blob/68a6a075f4aeab1788a1bba736bfcb428cfbbacb/aio/content/guide/i18n-common-locale-id.md

We can see statement: "The Angular repository includes common locales."

I remember some time ago ( around 2020 ) that this folder contained raw files, each representing locale and the names were exactly like LCID string and it was easy to tell what was supported and what is not.

The issue now is that locale files are generated through Bazel and are never part of the sources.. So to experiment what is supported and what not i simply try import stuff..

( I remember Norwegian being not supported ) e.g. This line is still failing: import 'no' from '@angular/common/locales/no'; image

Is there a better way? Can you update your docs after Bazel revolution to ultimately answer what locales are supported and which not? and btw. what about Norwegian language :)

What is the affected URL?

https://angular.io/guide/i18n-common-locale-id

Please provide the steps to reproduce the issue

Visit docs page, see there is no supported locale list. No way to easy find this.

Please provide the expected behavior vs the actual behavior you encountered

I need list of supported locales.

Please provide a screenshot if possible

No response

Please provide the exception or error you saw

No response

Is this a browser-specific issue? If so, please specify the device, browser, and version.

No response

TomaszCz avatar Sep 12 '22 07:09 TomaszCz

no is a valid locale in version 13+. See: https://unpkg.com/browse/@angular/[email protected]/locales/no.mjs

Prior to version 13, however this used to be nb, More information about this can be found in the ICU blog about the changes in Norwegian locales in CLDR v39 https://icu.unicode.org/design/norwegian-locales-changes-in-v39

alan-agius4 avatar Sep 12 '22 08:09 alan-agius4

Glad to hear the no local issue is sorted out.

@bob-watson We no longer store the files in that dir; they are generated automatically. We could update the docs if you'd like.

dylhunn avatar Sep 12 '22 17:09 dylhunn

@alan-agius4 '@angular/common/locales/nb' indeed works, thank you for fast answer!

TomaszCz avatar Sep 13 '22 07:09 TomaszCz

Looks like theres no issue here. Feel free to file a new bug if you find something else.

jessicajaniuk avatar Sep 19 '22 17:09 jessicajaniuk

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.