Skip to content

Feature: getLocaleNumberSymbol API for CurrencyDecimal etc #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KirstenStake opened this issue May 11, 2021 · 1 comment
Open

Feature: getLocaleNumberSymbol API for CurrencyDecimal etc #433

KirstenStake opened this issue May 11, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@KirstenStake
Copy link

Is your feature request related to a problem? Please describe.

I need to know the decimal symbol of a locale (for example: en-GB uses . and pt-BR uses , )
According to your docs you only provide a localizeNumber() function which formats the actual number with the locale's decimal. This is not the required action I need, I need to only know the actual CurrencyDecimal symbol.

Describe the solution you'd like

A function to specify what symbol you would like to get returned based on the locale. In my specific instace "CurrencyDecimal". I previously used this function from angular/core translate which is their getLocaleNumberSymbol() where you can specify what numberSymbol you require.

This is not an unhandled feature since switching to transloco

Current behavior

You only provide a function for localizeNumber() which requires the whole number as a value. I only require the actual symbol to be returned, nothing to do with formatting.

Expected behavior

function like getLocaleNumberSymbol(locale, "currencyDecimal") to return a response of ',' or '.' etc

@itayod
Copy link
Contributor

itayod commented May 16, 2021

@KirstenStake seems like a pretty rare requirement, but if you like you can try to implement it and create a pr that adds that ability to our LocaleService.

@shaharkazaz shaharkazaz added the enhancement New feature or request label Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants