Files
dragonpilot/common/i18n.py
T
Rick Lan 657e180ba3 dragonpilot 0.7.8.1
========================
* Added ko-KR translation.
* Added Honda Jade support. (Thanks to @lijunhao731)
* Fixed ui.cc memory out of bound issue. (Thanks to @piggy)
* gpxd now store in zip format.
* Force disabled DOS hardware check in panda.
2020-09-21 13:38:49 +10:00

12 lines
418 B
Python

import gettext
from common import android
is_android = android.ANDROID
locale_dir = '/data/openpilot/selfdrive/assets/locales'
supported_language = ['en-US', 'zh-TW', 'zh-CN', 'ja-JP', 'ko-KR']
locale = android.getprop("persist.sys.locale") if is_android else 'en-US'
def events():
i18n = gettext.translation('events', localedir=locale_dir, fallback=True, languages=[locale])
i18n.install()
return i18n.gettext