Reverse geo lookup - set button active and language

Stefan Fuchs sfuchs at gmx.de
Mon Oct 16 02:13:05 PDT 2017


Am 16.10.2017 um 11:11 schrieb Dirk Hohndel:
>> I currently try to fix this. Maybe the syntax of the provider changed:
>> http://www.geonames.org/export/JSON-webservices.html
>
> :-(
>
> Breaking APIs of web services... not nice
>
>> It seems to be now "lang=de" what we need and currently we pass
>> "language=de_DE".
>> Changing the "language" to "lang" is a no-brainer but how can I teach
>> the uiLanguage() function to return the short language string? Or
>> shall I simply truncate it?
>
> Yes, the first two letters are the language, then you get a dash or
> underscore, then the country.
> Some languages do not have the country modifier at all.
Perfect, so my ".left(2)" will do.


-- 

Stefan Fuchs
E-Mail: sfuchs at gmx.de <mailto:sfuchs at gmx.de>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20171016/e63b1d4e/attachment.html>


More information about the subsurface mailing list