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
Hi, first of all thanks for this. Is super helpful and looks super complete!
I was reading the issues and search in all repo but I didn't see any references to localization. Is there something related with the translation of the units?
Could be a translations folder. And people could initialize like formatter
Then you can pass the type of format. We could have long/short format. And also take into account plurals. 1 meter vs 2 meters
I would introduce a new method to
newQty(1,'m').localizedFormat({format: 'long'})// 1 meter// Change to SpanishQty.translations=LOCALES.esnewQty(2,'m').localizedFormat({format: 'long'})// you can omit "targetUnit" if you want the same// 2 metrosnewQty(2,'m').localizedFormat({targetUnit: 'cm',format: 'long'})// 200 centímetros// Short version by defaultnewQty(2,'m').localizedFormat({targetUnit: 'cm'})// 200 cm
I realize maybe what I want is doable by myself with Qty.formatter but I think could be nice to have these translations in the repo shared and maintained by the community.
What do you think? : )
The text was updated successfully, but these errors were encountered:
Hi, first of all thanks for this. Is super helpful and looks super complete!
I was reading the issues and search in all repo but I didn't see any references to localization. Is there something related with the translation of the units?
Could be a
translations
folder. And people could initialize like formatterThen you can pass the type of format. We could have long/short format. And also take into account plurals.
1 meter vs 2 meters
I would introduce a new method to
I realize maybe what I want is doable by myself with
Qty.formatter
but I think could be nice to have these translations in the repo shared and maintained by the community.What do you think? : )
The text was updated successfully, but these errors were encountered: