Class: QgsTranslationContext¶
-
class
qgis.core.
QgsTranslationContext
¶ Bases:
sip.wrapper
Constructor
QgsTranslationContext(QgsTranslationContext)
Used for the collecting of strings from projects for translation and creation of ts files.
New in version 3.4: Enums
Methods
Returns the TS fileName
Returns the project
Registers the
source
to be translated.Sets the
fileName
of the TS fileSets the
project
being translated.Writes the Ts-file
Signals
Attributes
-
fileName
(self) → str¶ Returns the TS fileName
See also
-
project
(self) → QgsProject¶ Returns the project
See also
-
registerTranslation
(self, context: str, source: str)¶ Registers the
source
to be translated. It’s the text of the object needed to be translated. Thecontext
defines in what context the object is used. Means layer name and sub category of object needed to be translated.
-
setFileName
(self, fileName: str)¶ Sets the
fileName
of the TS fileSee also
-
writeTsFile
(self, locale: str)¶ Writes the Ts-file
-