Add module for internationalization and localization

This commit is contained in:
pazpi 2024-09-11 21:29:20 +02:00
parent 4e649d4344
commit 9c3ec747d7
2 changed files with 31 additions and 0 deletions

30
modules/desktop/i18n.nix Normal file
View file

@ -0,0 +1,30 @@
{ config, lib, ... }:
let
cfg = config.my.utils.i18n;
in
{
options.my.utils.i18n = {
enable = lib.mkEnableOption "Enable internationalization and localization";
};
config = lib.mkIf cfg.enable {
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "it_IT.UTF-8";
LC_IDENTIFICATION = "it_IT.UTF-8";
LC_MEASUREMENT = "it_IT.UTF-8";
LC_MONETARY = "it_IT.UTF-8";
LC_NAME = "it_IT.UTF-8";
LC_NUMERIC = "it_IT.UTF-8";
LC_PAPER = "it_IT.UTF-8";
LC_TELEPHONE = "it_IT.UTF-8";
LC_TIME = "it_IT.UTF-8";
};
# Configure console keymap
console.keyMap = "it";
};
}