Skip to content

Commit

Permalink
feat/ovos_defaults (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored May 12, 2024
1 parent 69df4ff commit 9288f07
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lingua_franca/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@
load_languages, unload_language, unload_languages, get_supported_langs

from lingua_franca import config

# honor the global OVOS language preferences unless configured to do otherwise
if config.ovos_defaults:
try:
from ovos_config.locale import setup_locale
from ovos_config.config import Configuration
# if running in a OVOS system, set default lang/timezone from config file
setup_locale()
# pre load all secondary_langs
secondary_langs = Configuration().get("secondary_langs", [])
if secondary_langs:
load_languages(secondary_langs)
except ImportError:
pass
1 change: 1 addition & 0 deletions lingua_franca/config.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
load_langs_on_demand = False
inject_timezones = True
ovos_defaults = True # use mycroft.conf for default values

0 comments on commit 9288f07

Please sign in to comment.