|
QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
An interface for objects which can translate project strings. More...
#include <qgsprojecttranslator.h>

Public Member Functions | |
| virtual | ~QgsProjectTranslator ()=default |
| virtual QString | translate (const QString &context, const QString &sourceText, const char *disambiguation=nullptr, int n=-1) const =0 |
| Translates a string using the Qt QTranslator mechanism. | |
An interface for objects which can translate project strings.
Definition at line 29 of file qgsprojecttranslator.h.
|
virtualdefault |
|
pure virtual |
Translates a string using the Qt QTranslator mechanism.
This function can be called from wherever the QgsReadWriteContext is available.
| context | describes the context of the translation, eg the corresponding map layer |
| sourceText | the identifier of the text to translate (usually the original untranslated string) |
| disambiguation | optional string providing additional context for the translation |
| n | optional "object count", which can alter the translation to account for plural forms |
Implemented in QgsProject.