Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
1st try: default locale -> en
Browse files Browse the repository at this point in the history
  • Loading branch information
wilhelmberg committed Feb 9, 2015
1 parent cea72a3 commit 07bfd9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file modified VoGisProfilTool.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions VoGisProfilTool/vogisprofiltoolmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ def __init__(self, iface):
else:
loc = QSettings().value("locale/userLocale")[0:2]

QgsMessageLog.logMessage("locale: {0}".format(loc), 'VoGis')

if QFileInfo(self.plugin_dir).exists():
#QgsMessageLog.logMessage('plugin_dir exits', 'VoGis')
localePath = self.plugin_dir + "/i18n/vogisprofiltoolmain_" + loc + ".qm"

if loc != 'de' and not QFileInfo(localePath).exists():
localePath = self.plugin_dir + "/i18n/vogisprofiltoolmain_en.qm"

if QFileInfo(localePath).exists():
#QgsMessageLog.logMessage('localePath exits', 'VoGis')
self.translator = QTranslator()
Expand Down

0 comments on commit 07bfd9d

Please sign in to comment.