Set the provided language as the current translation
(self, language: Language, set_font: bool = True)
| 203 | raise ValueError(f'No language with abbreviation "{abbr}" found') |
| 204 | |
| 205 | def activate(self, language: Language, set_font: bool = True) -> None: |
| 206 | """ |
| 207 | Set the provided language as the current translation |
| 208 | """ |
| 209 | # The install() call has the side effect of assigning GNUTranslations.gettext to builtins._ |
| 210 | language.translation.install() |
| 211 | self._active_language = language |
| 212 | |
| 213 | if set_font and not self._using_env_font: |
| 214 | self._set_font(language.console_font) |
| 215 | |
| 216 | def apply_console_font(self) -> None: |
| 217 | """Apply console font from FONT env var or active language mapping. |
no test coverage detected