test if this locale corresponds to one of the available locales. At present, $available_locales = array('en', 'fr');
use the new version of the function SELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}', '{locale}'); with a try / catch (and use the old one if the first failed SELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}');
The upcoming version of the plugin will allow to use a new parameter to set the locale. See the PR https://github.com/3liz/qgis-pgmetadata-plugin/pull/50
In Lizmap module, we should
jLocale
$available_locales = array('en', 'fr');
SELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}', '{locale}');
with a try / catch (and use the old one if the first failedSELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}');
cc @drillinP @Gustry