[Qgis-developer] WMS metadata() in non-English locale

Matthias Kuhn matthias at opengis.ch
Tue Jan 31 12:02:47 PST 2017


Hi Tom,

Yes, unfortunately the string is translated.

Would be nice to have that available the same way as for vector data
providers:

QVariantMap metadata();
QString translateMetadataKey( const QString& key );
QString translateMetadataValue( const QString& key, const QVariant& value );

Cheers
Matthias

On 01/31/2017 08:49 PM, Tom Chadwin wrote:
> I am trying to retrieve the WMS version of a layer, and am just parsing its
> metadata(), as no other solution was suggested here:
> 
> http://gis.stackexchange.com/questions/213817/get-wms-version-from-qgis-layer-in-python
> 
> However, what does metadata() return if the user's locale is not English? In
> other words, will "VERSION" be translated, and hence will this method fail? 
> 
> 
> 
> -----
> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-metadata-in-non-English-locale-tp5305601.html
> Sent from the QGIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


More information about the Qgis-developer mailing list