On 7.5.2022 12.46, Thomas Huth wrote:
Am Sat, 7 May 2022 10:35:46 +0200
schrieb Christian Zietz <czietz@xxxxxxx>:
Nicolas Pomarède schrieb:
for a next EmuTOS version, could there be a way to choose language
from
the boot screen too ? This would make it easier for people using
stf/ste
mode where there's no nvram to choose a different language from
english
at boot.
Funny, I intended to ask *you* a similar question in my previous
mail --
but I forgot to include it.
Could a future Hatari release offer a way to choose the language via
its
configuration options?
FYI: new Hatari version has "nLanguage" and "nKbdLayout" settings in
the configuration "Keyboard" section, which can be set to desired
country code (-1=unset).
One can use "--language" and "--layout" command line options to set
them (before saving config):
---------------------------------
$ hatari --language foo
Unrecognized language code 'foo'!
TOS v4 supports:
- us : USA
- de : Germany
- fr : France
- uk : United Kingdom
- es : Spain
- it : Italy
- se : Sweden
EmuTOS 1024k (v1.1.x) supports also:
- ch_fr : Switzerland (French)
- ch_de : Switzerland (German)
- tr : Turkey
- fi : Finland
- no : Norway
- dk : Denmark
- sa : Saudi Arabia
- nl : Holland
- cs : Czech Republic
- hu : Hungary
- ru : Russia
- gr : Greece
---------------------------------
Basically, the 1024k ROM is an "emulator-only" version of EmuTOS
[1], as
no Atari machine supports 1024k ROMs. And we created this
multi-language
ROM mainly for the benefit of emulators not having to ship N different
language versions.
Anyway, I'm Cc'ing your question to the EmuTOS list, since I'm not sure
if EmuTOS would even support a language change at runtime. As soon as
the boot screen is shown, one language has obviously already been
selected.
I think the best way would be to patch the ROM header of EmuTOS in
Hatari
according to the LANG environment variable. IIRC EmuTOS honors the
language
setting in the ROM header, too, so that would be an easy solution as
far as
I can tell.
As there's already Hatari config & CLI options support for the NVRAM
setting and 2-letter country code => TOS country code value mapping
code, adding LANG parsing + setting TOS header value should not be
much additional code.
The problem with the OS header country code is that it affects *both*
language and keyboard layout, but:
* LANG env var is only about language
* quite a few people want keyboard setting different from language
setting
IMHO clearest would be to:
* Default Keyboard.nLanguage to a country code based on LANG i.e. it
would normally just affect NVRAM setting
* Set OS header country code only when both Keyboard.nLanguage and
Keyboard.nKbdLayout values match
- Eero