From 42210a99104d83d19cf7c426433721e1bf4ad1eb Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 28 Sep 2022 14:44:05 -0700 Subject: [PATCH] multilang: nav instructions (#25102) * Try Chinese nav * try this * not sure what does what * read language setting in navd * probably not used Co-authored-by: Willem Melching --- selfdrive/navd/navd.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/selfdrive/navd/navd.py b/selfdrive/navd/navd.py index 72874b2113..4855b63594 100755 --- a/selfdrive/navd/navd.py +++ b/selfdrive/navd/navd.py @@ -120,6 +120,10 @@ class RouteEngine: cloudlog.warning(f"Calculating route {self.last_position} -> {destination}") self.nav_destination = destination + lang = self.params.get('LanguageSetting', encoding='utf8') + if lang is not None: + lang = lang.replace('main_', '') + params = { 'access_token': self.mapbox_token, 'annotations': 'maxspeed', @@ -128,6 +132,7 @@ class RouteEngine: 'steps': 'true', 'banner_instructions': 'true', 'alternatives': 'false', + 'language': lang, } if self.last_bearing is not None: