-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Labels
Description
Problem
The library offers method to get the unit abbreviation localized. However, there is no way of localizing the quantity and unit's name. It would help if the library could handle localization of them "built-in".
Solution
Currently the localization is handled in Json files under the Localization
field. The idea would be to duplicate this field for each properties that defines names so each names can be localized.
Here is an example of the localization within a json file.
{
"Name": "Length",
"BaseUnit": "Meter",
"XmlDoc": "Many different units of length [...] is sub-divided into SI and non-SI units.",
"Localization": [{ "Culture": "fr-CA", "Name": "Longueur" }],
"Units": [
{
"SingularName": "Meter",
"PluralName": "Meters",
"FromUnitToBaseFunc": "x",
"FromBaseToUnitFunc": "x",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo" ],
"Localization":
[
{ "Culture": "en-US", "Abbreviations": [ "m" ] },
{ "Culture": "fr-CA", "SingularName": "Mètre", "PluralName": "Mètres" }
]
}
]
}
This feature could be linked to #371. The public properties and the abstract class could implement the methods and properties to access the localized names. In a similar way of the abbreviation.
angularsen, sztepen and dragongling