After your recent changes the thing here is like this:
1) lang_territory = de_DE
2) lang_territory = de (as that is my stored QSetting)
3) lang_territory = de (as I didn't pass ``-lang``)

So lang = de before doing the ``truncate()`` and is empty afterwards. So you pass an empty variable ``lang`` into the further calls, where it should be ``de`` and ``de`` where it should be ``de_DE``, right? It seems to work okay, but I'm not sure if this is intended :).