How can one translate QGIS processing scripts GUI and user messages to other languages ?
The QGIS documentation explains how to translate Python plugins, but not processing scripts.
How can one translate QGIS processing scripts GUI and user messages to other languages ?
The QGIS documentation explains how to translate Python plugins, but not processing scripts.
There might be better ways to achieve this, but if it's only for a handful of additional languages you can do something like this:
from qgis.PyQt.QtCore import QSettings
settings = QSettings()
description = 'description in English'
if settings.value('locale/userLocale')[0:2] == 'de':
description = 'description in German'
print(description)