Moin Michel, On Tue, 03. Oct 2023 at 11:04:26 +0000, Michel Stuyts via QGIS-User wrote: > In for example the file "qgis_nl.ts" I found the translated value for > "Loading Plugins":
You also need to know the context of the translation, ie.:
<context>
<name>QObject</name>
…
> <message>
> <location filename="../src/app/qgspluginregistry.cpp" line="410"/>
> <source>Loading Plugins</source>
> <translation>Plug-ins laden</translation>
> </message>
>
> But I want to use that translation in a Python plugin. Does anybody know
> what the way is to get the translation of a core string using Python?
>>> QCoreApplication.translate("QObject", "Loading Plugins")
'Plug-ins laden'
Jürgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden https://www.norbit.de
QGIS release manager (PSC) Germany IRC: jef on Libera|OFTC
signature.asc
Description: PGP signature
_______________________________________________ QGIS-User mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
