We would like to be able to format values from a data field directly in the resource-files. This would give a simple way to get f.ex. thousand separator or comma when showing a numeric value, instead of having to concat several texts each time we need formatted text in the middle of a sentence. This would also make translation easier.
I imagine this could look something like this:
{
"id": "lang.info.fra.prefill",
"value": "Ved forrige innrapportering oppga dere å ha dyrket totalt {0} kvadratmeter bambus.",
"variables": [
{
"key": "Prefill.kvadratmeterbambus",
"dataSource": "dataModel.A3_RA-0775_M",
"formatting": {
"number": {
"decimalScale": 0,
"thousandSeparator": " "
}
}
}
]
}
Formatting f.ex. dates in a similar fashion would also be useful.
Description
We would like to be able to format values from a data field directly in the resource-files. This would give a simple way to get f.ex. thousand separator or comma when showing a numeric value, instead of having to concat several texts each time we need formatted text in the middle of a sentence. This would also make translation easier.
I imagine this could look something like this:
Formatting f.ex. dates in a similar fashion would also be useful.
Additional Information
Related: https://github.com/Altinn/app-frontend-react/issues/1305