-
Notifications
You must be signed in to change notification settings - Fork 384
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
Localized quantity names #890
Comments
I believe this has already been discussed in #397 and I think it's a good idea to support something like this. Would you be interested in writing a short design proposal and then follow up with a pull request when we agree on a design? I'm happy to assist. |
Is there already a way to add a missing language for units in user code (i.e. without having to create a UnitsNet PR) ? I think when coming up with a design, this use case should be taken into account (for both units and quantities). |
Yes you can add abbreviations at runtime for 3rd party units: |
@angularsen I haven't been around a lot lately, but I wondered if the proposal discussed in the #397 would still work. I know that some work has been done to the UnitsNet core, thus my question. |
@yannickrondeau I looked over the proposal and yes I still think it fits, we don't have anything like this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is your feature request related to a problem? Please describe.
I various UIs we need the user to select a quantity, similar the UI in the unit converter sample app. For example for the configuration of the axis of a graph. But the UI must be localized to the culture of the user, hence also the names of units in the selection list must be localized.
Describe the solution you'd like
Just like UnitsNet provides localization for the values (number + unit) of a quantity it should also provide localization for the names of the quantities. For example
QuantityInfo.ToString()
could return the localized name of the quantity.Describe alternatives you've considered
The best alternative we could come up with so far is that we could write a tool that adds all names from
Quantity.Infos
and populate resx files with it, that we then embed in our application. But we would need to synchronize these resx files with the version of UnitsNet that is being used in each project and update them manually whenever a new version of UnitsNet is released. Also this won't solve the problem of localizing custom quantities. It would be nice if the proposed solution could also handle localization custom quantities (the provider of the custom quantity could also provides all localizations for it).The text was updated successfully, but these errors were encountered: