concrete-datastore
concrete-datastore copied to clipboard
Ability to add a language as queryparams for `export`
export endpoint should be able to accept the queryparam ?lang= with the value of the language desired for the export (for example fr).
If this queryparam exists, the following should be transalted to the selected language:
Booleans: for example if?lang=fr,TruebecomesVRAIandFalsebecomesFAUX- datetime and date fields: the value of pendulum with the right
localeset should be returned in the format:YYYY/MM/DD HH:mm:ss - csv headers: the name of the files should be translated depending on a setting in concrete datatsore: this setting is a dict and looks like:
{
"fr": {
"filed_name_1": "nom_du_champ_1",
"filed_name_2": "nom_du_champ_2"
}
}
We may have to split the issue into 2 sub-issues :
- standard translations using i18n mechnisms from Django
- dynamic translations for meta data about models definition