You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have the name of a locale only available at compile time or need to access them e.g. via Object.keys(faker.locales)
But some feature requests like #350 need the BCP 47 language tag
But not only for this, but also for other features in the future it could be useful to access the language tag at runtime inside faker, or e.g. fetch it from the current used locale when we do not have locale as in v7 anymore
Suggested solution
Add a new key like title and separator into the locale definitions (at root level for a LocaleDefinition)
Alternative
Not sure if we might want to add several tags/keys because there is a locale and a country part.
Also not sure if there are other important formats we need to benefit from. (At least BCP 47 is the one that is mentioned in the JS mozilla docs)
Clear and concise description of the problem
Currently we have the name of a locale only available at compile time or need to access them e.g. via
Object.keys(faker.locales)
But some feature requests like #350 need the BCP 47 language tag
But not only for this, but also for other features in the future it could be useful to access the language tag at runtime inside faker, or e.g. fetch it from the current used locale when we do not have locale as in v7 anymore
Suggested solution
Add a new key like
title
andseparator
into the locale definitions (at root level for aLocaleDefinition
)Alternative
Not sure if we might want to add several tags/keys because there is a locale and a country part.
Also not sure if there are other important formats we need to benefit from. (At least BCP 47 is the one that is mentioned in the JS mozilla docs)
Additional context
The text was updated successfully, but these errors were encountered: