mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
change ltr/rtl based on interface lang
This commit is contained in:
parent
7265d13537
commit
08228c8837
2 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,7 @@ class Config(dict):
|
|||
'deckBrowserOrder': 0,
|
||||
'deckBrowserNameLength': 30,
|
||||
'deleteMedia': False,
|
||||
'forceLTR': False,
|
||||
}
|
||||
for (k,v) in fields.items():
|
||||
if not self.has_key(k):
|
||||
|
|
|
@ -1965,6 +1965,10 @@ it to your friends.
|
|||
self.mainWin.retranslateUi(self)
|
||||
anki.lang.setLang(self.config["interfaceLang"], local=False)
|
||||
self.updateTitleBar()
|
||||
if self.config['interfaceLang'] in ("he",) and not self.config['forceLTR']:
|
||||
self.app.setLayoutDirection(Qt.RightToLeft)
|
||||
else:
|
||||
self.app.setLayoutDirection(Qt.LeftToRight)
|
||||
|
||||
def getTranslation(self, text):
|
||||
return self.languageTrans.ugettext(text)
|
||||
|
|
Loading…
Reference in a new issue