mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 22:55:46 +01:00
18 lines
416 B
Python
18 lines
416 B
Python
import logging
|
|
import gettext
|
|
|
|
from PyQt6.QtCore import QLocale
|
|
|
|
from buzz.assets import get_path
|
|
from buzz.settings.settings import APP_NAME
|
|
|
|
locale_dir = get_path("locale")
|
|
gettext.bindtextdomain("buzz", locale_dir)
|
|
|
|
logging.debug(f"UI locales {QLocale().uiLanguages()}")
|
|
|
|
translate = gettext.translation(
|
|
APP_NAME.lower(), locale_dir, languages=QLocale().uiLanguages(), fallback=True
|
|
)
|
|
|
|
_ = translate.gettext
|