Feat/add locale support#919
Conversation
|
Thanks for the PR, @digitalLumberjack! This is indeed a long-standing pain point, and I'm particularly impressed to see a member of the community stepping up to try and address it. I'll try and address your points in order:
|
Yes, I'd suggest we might need to work out a schema change for operating systems to advertise their locale options - lest we feed an OS something invalid, and cause a fatal configuration break. And yes - I'd actually envision this entire mechanism having to change. Locales are actually too important to be relegated to a drop-down, and if you look at the set-up wizards of eg Ubuntu, that's essentially doing what OS customisation is trying to do - and those wizards do it in a much grander way. For Imager v2.0.0, I'm hoping to introduce something like that - including a full-window Locale selector.
Now that's a good idea (I've been noodling in that direction for a while, and I've broadly come to the conclusion that's the best way forward). |
|
I guess this is now defunct in light of Imager 2.0 ? |

Hi, see #852
PR opened for discussion about what we could add for locales.
I added the support for setting the locale in OS Customization (and automatic detection of it based on the timezone, for GB, USA, and France).
The locales list (locales.txt) comes from:
on Raspberry Pi OS.
The ui renders like this:

The
firstuse.shscripts is modified to uselocalectl set-locale LANG=$LOCALE LC_ALL=$LOCALE LANGUAGE=$LOCALEon first boot.(
localectluselocale-genand update the/etc/default/localefileThe user_data cloudinit yaml has the new entry locale (see https://cloudinit.readthedocs.io/en/latest/reference/modules.html#locale):
Open questions:
LOCALECODE [(Human Readable)]something you would like to keep ?Thanks to every contributor of this great tool :)