﻿// SPDX-License-Identifier: GPL-3.0-or-later

#include "nkctx.h"
#include "ini.h"
#include "ui.h"
#include "gettext.h"

#define INVALID_ZTXT_ID u8"!!INVALID ID - FIX ME!!"

static const char*
lang_en_us[ZTXT__MAX] =
{
	[ZTXT_QEMU] = u8"QEMU",
	[ZTXT_PATH] = u8"Path",
	[ZTXT_ARCH] = u8"Architecture",
	[ZTXT_CPU] = u8"CPU",
	[ZTXT_SMP] = u8"SMP",
	[ZTXT_NAME] = u8"Name",
	[ZTXT_MODEL] = u8"Model",
	[ZTXT_MACHINE] = u8"Machine",
	[ZTXT_HYPER_V] = u8"Hyper-V",
	[ZTXT_KERNEL_IRQCHIP] = u8"IRQ Chip",
	[ZTXT_VIRT] = u8"Virtualization",
	[ZTXT_MEMORY] = u8"Memory",
	[ZTXT_SIZE] = u8"Size",
	[ZTXT_FIRMWARE] = u8"Firmware",
	[ZTXT_TYPE] = u8"Type",
	[ZTXT_OPTIONS] = u8"Options",
	[ZTXT_BOOT_MENU] = u8"Boot Menu",
	[ZTXT_TIMEOUT] = u8"Timeout",
	[ZTXT_PFLASH] = u8"pflash",
	[ZTXT_DISPLAY] = u8"Display",
	[ZTXT_FULLSCREEN] = u8"Full Screen",
	[ZTXT_NETWORK] = u8"Network",
	[ZTXT_MAC_ADDRESS] = u8"MAC",
	[ZTXT_PERIPHERAL] = u8"Peripheral",
	[ZTXT_USB] = u8"USB",
	[ZTXT_KEYBOARD] = u8"Keyboard",
	[ZTXT_MOUSE] = u8"Mouse",
	[ZTXT_TABLET] = u8"Tablet",
	[ZTXT_AUDIO]  = u8"Audio",
	[ZTXT_BACKEND] = u8"Backend",
	[ZTXT_INTEL_HDA] = u8"Intel HDA",
	[ZTXT_PC_SPEAKER] = u8"PC Speaker",
	[ZTXT_BATTERY] = u8"Battery",
	[ZTXT_AC_POWER] = u8"AC Power",
	[ZTXT_BOOT_DEVICE] = u8"Boot Device",
	[ZTXT_DISK_IMAGE] = u8"Disk Image",
	[ZTXT_ISO_IMAGE] = u8"ISO Image",
	[ZTXT_PHYSICAL_DISK] = u8"Physical Disk",
	[ZTXT_CD_ROM] = u8"CD-ROM",
	[ZTXT_HARD_DISK] = u8"Hard Disk",
	[ZTXT_FLOPPY] = u8"Floppy",
	[ZTXT_FLOPPY_IMAGE] = u8"Floppy Image",
	[ZTXT_PXE] = u8"PXE",
	[ZTXT_BOOT_FILE] = u8"Boot File",
	[ZTXT_HTTP] = u8"HTTP",
	[ZTXT_PORT] = u8"Port",
	[ZTXT_LINUX_KERNEL] = u8"Linux Kernel",
	[ZTXT_KERNEL] = u8"Kernel",
	[ZTXT_INITRD] = u8"INITRD",
	[ZTXT_CMDLINE] = u8"cmdline",
	[ZTXT_DTB] = u8"DTB",
	[ZTXT_SHIM_EFI] = u8"shim.efi",
	[ZTXT_WIM_IMAGE] = u8"WIM Image",
	[ZTXT_WIM_INDEX] = u8"Image Index",
	[ZTXT_DIR_VVFAT] = u8"Folder (VVFAT)",
	[ZTXT_DIR] = u8"Folder",
	[ZTXT_SNAPSHOT] = u8"Snapshot",
	[ZTXT_INTERFACE] = u8"Interface",
	[ZTXT_NO_DEVICE] = u8"NO DEVICE",
	[ZTXT_ADDITIONAL] = u8"Additional Storage",
	[ZTXT_FILE] = u8"File",
	[ZTXT_DEVICE] = u8"Device",
	[ZTXT_COPY] = u8"Copy",
	[ZTXT_SAVE] = u8"Save",
	[ZTXT_START] = u8"Start",
	[ZTXT_STOP] = u8"Stop",
	[ZTXT_SCREENSHOT] = u8"Screenshot",
	[ZTXT_SAVE_TO] = u8"Save To",
	[ZTXT_CLIPBOARD] = u8"Clipboard",
	[ZTXT_LOGS] = u8"Logs",
	[ZTXT_WARN_NOT_ADMIN] = u8"No administrator privileges. Click to obtain.",
	[ZTXT_WARN_NON_ASCII] = u8"Paths with commas or non-ASCII characters are NOT supported",
	[ZTXT_WARN_OUT_OF_MEM] = u8"Available memory may be insufficient",
	[ZTXT_WARN_FULLSCREEN] = u8"Full screen mode enabled, use Ctrl+Alt+F to toggle",
	[ZTXT_WARN_NOT_BOOTABLE] = u8"The image may be non-bootable",
	[ZTXT_MSG_COPIED] = u8"Copied to clipboard",
	[ZTXT_MSG_SAVED] = u8"Configuration saved",
	[ZTXT_MSG_MISSING_ARGS] = u8"Missing arguments",
	[ZTXT_MSG_KILLED] = u8"QEMU process has been terminated",
	[ZTXT_MSG_KILL_FAILED] = u8"Unable to terminate QEMU process",
	[ZTXT_MSG_PNG_OK] = u8"Screenshot saved",
	[ZTXT_MSG_PNG_ERR] = u8"Failed to save screenshot",
	[ZTXT_UNSUPPORTED] = u8"Unsupported",
};

static const char*
lang_zh_cn[ZTXT__MAX] =
{
	[ZTXT_QEMU] = u8"QEMU",
	[ZTXT_PATH] = u8"路径",
	[ZTXT_ARCH] = u8"架构",
	[ZTXT_CPU] = u8"CPU",
	[ZTXT_SMP] = u8"核心数",
	[ZTXT_NAME] = u8"名称",
	[ZTXT_MODEL] = u8"型号",
	[ZTXT_MACHINE] = u8"机型",
	[ZTXT_HYPER_V] = u8"Hyper-V",
	[ZTXT_KERNEL_IRQCHIP] = u8"IRQ Chip",
	[ZTXT_VIRT] = u8"虚拟化",
	[ZTXT_MEMORY] = u8"内存",
	[ZTXT_SIZE] = u8"大小",
	[ZTXT_FIRMWARE] = u8"固件",
	[ZTXT_TYPE] = u8"类型",
	[ZTXT_OPTIONS] = u8"选项",
	[ZTXT_BOOT_MENU] = u8"启动菜单",
	[ZTXT_TIMEOUT] = u8"超时",
	[ZTXT_PFLASH] = u8"pflash",
	[ZTXT_DISPLAY] = u8"显示",
	[ZTXT_FULLSCREEN] = u8"全屏",
	[ZTXT_NETWORK] = u8"网络",
	[ZTXT_MAC_ADDRESS] = u8"MAC",
	[ZTXT_PERIPHERAL] = u8"外设",
	[ZTXT_USB] = u8"USB",
	[ZTXT_KEYBOARD] = u8"键盘",
	[ZTXT_MOUSE] = u8"鼠标",
	[ZTXT_TABLET] = u8"触摸板",
	[ZTXT_AUDIO] = u8"音频",
	[ZTXT_BACKEND] = u8"后端",
	[ZTXT_INTEL_HDA] = u8"Intel HDA",
	[ZTXT_PC_SPEAKER] = u8"PC Speaker",
	[ZTXT_BATTERY] = u8"电池",
	[ZTXT_AC_POWER] = u8"交流电源",
	[ZTXT_BOOT_DEVICE] = u8"启动设备",
	[ZTXT_DISK_IMAGE] = u8"磁盘镜像",
	[ZTXT_ISO_IMAGE] = u8"ISO 镜像",
	[ZTXT_PHYSICAL_DISK] = u8"物理磁盘",
	[ZTXT_CD_ROM] = u8"光盘",
	[ZTXT_HARD_DISK] = u8"硬盘",
	[ZTXT_FLOPPY] = u8"软盘",
	[ZTXT_FLOPPY_IMAGE] = u8"软盘镜像",
	[ZTXT_PXE] = u8"PXE",
	[ZTXT_BOOT_FILE] = u8"启动文件",
	[ZTXT_HTTP] = u8"HTTP",
	[ZTXT_PORT] = u8"端口",
	[ZTXT_LINUX_KERNEL] = u8"Linux 内核",
	[ZTXT_KERNEL] = u8"内核",
	[ZTXT_INITRD] = u8"INITRD",
	[ZTXT_CMDLINE] = u8"命令行",
	[ZTXT_DTB] = u8"设备树",
	[ZTXT_SHIM_EFI] = u8"shim.efi",
	[ZTXT_WIM_IMAGE] = u8"WIM 镜像",
	[ZTXT_WIM_INDEX] = u8"镜像索引",
	[ZTXT_DIR_VVFAT] = u8"文件夹 (VVFAT)",
	[ZTXT_DIR] = u8"文件夹",
	[ZTXT_SNAPSHOT] = u8"快照",
	[ZTXT_INTERFACE] = u8"接口",
	[ZTXT_NO_DEVICE] = u8"无设备",
	[ZTXT_ADDITIONAL] = u8"附加存储",
	[ZTXT_FILE] = u8"文件",
	[ZTXT_DEVICE] = u8"设备",
	[ZTXT_COPY] = u8"复制",
	[ZTXT_SAVE] = u8"保存",
	[ZTXT_START] = u8"启动",
	[ZTXT_STOP] = u8"终止",
	[ZTXT_SCREENSHOT] = u8"屏幕截图",
	[ZTXT_SAVE_TO] = u8"保存到",
	[ZTXT_CLIPBOARD] = u8"剪贴板",
	[ZTXT_LOGS] = u8"日志",
	[ZTXT_WARN_NOT_ADMIN] = u8"无管理员权限，点击获取",
	[ZTXT_WARN_NON_ASCII] = u8"不支持包含逗号或非ASCII字符的路径",
	[ZTXT_WARN_OUT_OF_MEM] = u8"可用内存可能不足",
	[ZTXT_WARN_FULLSCREEN] = u8"全屏模式已启用，使用Ctrl+Alt+F切换",
	[ZTXT_WARN_NOT_BOOTABLE] = u8"镜像可能不支持启动",
	[ZTXT_MSG_COPIED] = u8"已复制到剪贴板",
	[ZTXT_MSG_SAVED] = u8"已保存配置",
	[ZTXT_MSG_MISSING_ARGS] = u8"缺少参数",
	[ZTXT_MSG_KILLED] = u8"已中止QEMU进程",
	[ZTXT_MSG_KILL_FAILED] = u8"无法中止QEMU进程",
	[ZTXT_MSG_PNG_OK] = u8"已保存截图",
	[ZTXT_MSG_PNG_ERR] = u8"保存截图失败",
	[ZTXT_UNSUPPORTED] = u8"不支持",
};

static const char*
lang_zh_tw[ZTXT__MAX] =
{
	[ZTXT_QEMU] = u8"QEMU",
	[ZTXT_PATH] = u8"路徑",
	[ZTXT_ARCH] = u8"架構",
	[ZTXT_CPU] = u8"CPU",
	[ZTXT_SMP] = u8"核心數",
	[ZTXT_NAME] = u8"名稱",
	[ZTXT_MODEL] = u8"型號",
	[ZTXT_MACHINE] = u8"機型",
	[ZTXT_HYPER_V] = u8"Hyper-V",
	[ZTXT_KERNEL_IRQCHIP] = u8"IRQ Chip",
	[ZTXT_VIRT] = u8"虛擬化",
	[ZTXT_MEMORY] = u8"記憶體",
	[ZTXT_SIZE] = u8"大小",
	[ZTXT_FIRMWARE] = u8"韌體",
	[ZTXT_TYPE] = u8"型別",
	[ZTXT_OPTIONS] = u8"選項",
	[ZTXT_BOOT_MENU] = u8"啟動選單",
	[ZTXT_TIMEOUT] = u8"超時",
	[ZTXT_PFLASH] = u8"pflash",
	[ZTXT_DISPLAY] = u8"顯示",
	[ZTXT_FULLSCREEN] = u8"全屏",
	[ZTXT_NETWORK] = u8"網路",
	[ZTXT_MAC_ADDRESS] = u8"MAC",
	[ZTXT_PERIPHERAL] = u8"外設",
	[ZTXT_USB] = u8"USB",
	[ZTXT_KEYBOARD] = u8"鍵盤",
	[ZTXT_MOUSE] = u8"滑鼠",
	[ZTXT_TABLET] = u8"觸控板",
	[ZTXT_AUDIO] = u8"音訊",
	[ZTXT_BACKEND] = u8"後端",
	[ZTXT_INTEL_HDA] = u8"Intel HDA",
	[ZTXT_PC_SPEAKER] = u8"PC Speaker",
	[ZTXT_BATTERY] = u8"電池",
	[ZTXT_AC_POWER] = u8"交流電源",
	[ZTXT_BOOT_DEVICE] = u8"啟動裝置",
	[ZTXT_DISK_IMAGE] = u8"磁碟映象",
	[ZTXT_ISO_IMAGE] = u8"ISO 映象",
	[ZTXT_PHYSICAL_DISK] = u8"物理磁碟",
	[ZTXT_CD_ROM] = u8"光碟",
	[ZTXT_HARD_DISK] = u8"硬碟",
	[ZTXT_FLOPPY] = u8"軟碟",
	[ZTXT_FLOPPY_IMAGE] = u8"軟碟映象",
	[ZTXT_PXE] = u8"PXE",
	[ZTXT_BOOT_FILE] = u8"啟動檔案",
	[ZTXT_HTTP] = u8"HTTP",
	[ZTXT_PORT] = u8"連接埠",
	[ZTXT_LINUX_KERNEL] = u8"Linux 核心",
	[ZTXT_KERNEL] = u8"核心",
	[ZTXT_INITRD] = u8"INITRD",
	[ZTXT_CMDLINE] = u8"命令列",
	[ZTXT_DTB] = u8"裝置樹",
	[ZTXT_SHIM_EFI] = u8"shim.efi",
	[ZTXT_WIM_IMAGE] = u8"WIM 映象",
	[ZTXT_WIM_INDEX] = u8"映象索引",
	[ZTXT_DIR_VVFAT] = u8"資料夾 (VVFAT)",
	[ZTXT_DIR] = u8"資料夾",
	[ZTXT_SNAPSHOT] = u8"快照",
	[ZTXT_INTERFACE] = u8"介面",
	[ZTXT_NO_DEVICE] = u8"無裝置",
	[ZTXT_ADDITIONAL] = u8"附加儲存",
	[ZTXT_FILE] = u8"檔案",
	[ZTXT_DEVICE] = u8"裝置",
	[ZTXT_COPY] = u8"複製",
	[ZTXT_SAVE] = u8"儲存",
	[ZTXT_START] = u8"啟動",
	[ZTXT_STOP] = u8"終止",
	[ZTXT_SCREENSHOT] = u8"螢幕截圖",
	[ZTXT_SAVE_TO] = u8"儲存到",
	[ZTXT_CLIPBOARD] = u8"剪貼簿",
	[ZTXT_LOGS] = u8"日誌",
	[ZTXT_WARN_NOT_ADMIN] = u8"無管理員許可權，點選獲取",
	[ZTXT_WARN_NON_ASCII] = u8"不支援包含逗號或非ASCII字元的路徑",
	[ZTXT_WARN_OUT_OF_MEM] = u8"可用記憶體可能不足",
	[ZTXT_WARN_FULLSCREEN] = u8"全屏模式已啟用，使用Ctrl+Alt+F切換",
	[ZTXT_WARN_NOT_BOOTABLE] = u8"映象可能不支援啟動",
	[ZTXT_MSG_COPIED] = u8"已複製到剪貼簿",
	[ZTXT_MSG_SAVED] = u8"已儲存配置",
	[ZTXT_MSG_MISSING_ARGS] = u8"缺少引數",
	[ZTXT_MSG_KILLED] = u8"已中止QEMU程序",
	[ZTXT_MSG_KILL_FAILED] = u8"無法中止QEMU程序",
	[ZTXT_MSG_PNG_OK] = u8"已儲存截圖",
	[ZTXT_MSG_PNG_ERR] = u8"儲存截圖失敗",
	[ZTXT_UNSUPPORTED] = u8"不支援",
};

static const char*
lang_ja_jp[ZTXT__MAX] =
{
	[ZTXT_QEMU] = u8"QEMU",
	[ZTXT_PATH] = u8"パス",
	[ZTXT_ARCH] = u8"アーキ",
	[ZTXT_CPU] = u8"CPU",
	[ZTXT_SMP] = u8"コア数",
	[ZTXT_NAME] = u8"名前",
	[ZTXT_MODEL] = u8"モデル",
	[ZTXT_MACHINE] = u8"マシン",
	[ZTXT_HYPER_V] = u8"Hyper-V",
	[ZTXT_KERNEL_IRQCHIP] = u8"IRQチップ",
	[ZTXT_VIRT] = u8"仮想化",
	[ZTXT_MEMORY] = u8"メモリ",
	[ZTXT_SIZE] = u8"サイズ",
	[ZTXT_FIRMWARE] = u8"ファーム",
	[ZTXT_TYPE] = u8"タイプ",
	[ZTXT_OPTIONS] = u8"オプション",
	[ZTXT_BOOT_MENU] = u8"起動メニュー",
	[ZTXT_TIMEOUT] = u8"タイムアウト",
	[ZTXT_PFLASH] = u8"pflash",
	[ZTXT_DISPLAY] = u8"表示",
	[ZTXT_FULLSCREEN] = u8"全画面",
	[ZTXT_NETWORK] = u8"ネット",
	[ZTXT_MAC_ADDRESS] = u8"MAC",
	[ZTXT_PERIPHERAL] = u8"周辺機器",
	[ZTXT_USB] = u8"USB",
	[ZTXT_KEYBOARD] = u8"キーボード",
	[ZTXT_MOUSE] = u8"マウス",
	[ZTXT_TABLET] = u8"タブレット",
	[ZTXT_AUDIO] = u8"オーディオ",
	[ZTXT_BACKEND] = u8"Backend",
	[ZTXT_INTEL_HDA] = u8"Intel HDA",
	[ZTXT_PC_SPEAKER] = u8"PC Speaker",
	[ZTXT_BATTERY] = u8"バッテリー",
	[ZTXT_AC_POWER] = u8"AC電源",
	[ZTXT_BOOT_DEVICE] = u8"起動デバイス",
	[ZTXT_DISK_IMAGE] = u8"ディスクイメージ",
	[ZTXT_ISO_IMAGE] = u8"ISOイメージ",
	[ZTXT_PHYSICAL_DISK] = u8"物理ディスク",
	[ZTXT_CD_ROM] = u8"CD-ROM",
	[ZTXT_HARD_DISK] = u8"HDD",
	[ZTXT_FLOPPY] = u8"フロッピー",
	[ZTXT_FLOPPY_IMAGE] = u8"フロッピーイメージ",
	[ZTXT_PXE] = u8"PXE",
	[ZTXT_BOOT_FILE] = u8"ブートファイル",
	[ZTXT_HTTP] = u8"HTTP",
	[ZTXT_PORT] = u8"ポート",
	[ZTXT_LINUX_KERNEL] = u8"Linuxカーネル",
	[ZTXT_KERNEL] = u8"カーネル",
	[ZTXT_INITRD] = u8"INITRD",
	[ZTXT_CMDLINE] = u8"cmdline",
	[ZTXT_DTB] = u8"DTB",
	[ZTXT_SHIM_EFI] = u8"shim.efi",
	[ZTXT_WIM_IMAGE] = u8"WIMイメージ",
	[ZTXT_WIM_INDEX] = u8"イメージ番号",
	[ZTXT_DIR_VVFAT] = u8"フォルダ (VVFAT)",
	[ZTXT_DIR] = u8"フォルダ",
	[ZTXT_SNAPSHOT] = u8"スナップショット",
	[ZTXT_INTERFACE] = u8"インタフェース",
	[ZTXT_NO_DEVICE] = u8"デバイスなし",
	[ZTXT_ADDITIONAL] = u8"追加ストレージ",
	[ZTXT_FILE] = u8"ファイル",
	[ZTXT_DEVICE] = u8"デバイス",
	[ZTXT_COPY] = u8"コピー",
	[ZTXT_SAVE] = u8"保存",
	[ZTXT_START] = u8"開始",
	[ZTXT_STOP] = u8"停止",
	[ZTXT_SCREENSHOT] = u8"スクショ",
	[ZTXT_SAVE_TO] = u8"保存先",
	[ZTXT_CLIPBOARD] = u8"クリップボード",
	[ZTXT_LOGS] = u8"ログ",
	[ZTXT_WARN_NOT_ADMIN] = u8"管理者権限なし(クリックで取得)",
	[ZTXT_WARN_NON_ASCII] = u8"非ASCIIかコンマを含むパスは非対応",
	[ZTXT_WARN_OUT_OF_MEM] = u8"メモリ不足の可能性あり",
	[ZTXT_WARN_FULLSCREEN] = u8"全画面表示中 (Ctrl+Alt+Fで切替)",
	[ZTXT_WARN_NOT_BOOTABLE] = u8"起動不可の可能性あり",
	[ZTXT_MSG_COPIED] = u8"クリップボードにコピー済み",
	[ZTXT_MSG_SAVED] = u8"設定を保存しました",
	[ZTXT_MSG_MISSING_ARGS] = u8"引数不足",
	[ZTXT_MSG_KILLED] = u8"QEMUプロセスを終了しました",
	[ZTXT_MSG_KILL_FAILED] = u8"QEMUプロセスを終了できません",
	[ZTXT_MSG_PNG_OK] = u8"スクショを保存しました",
	[ZTXT_MSG_PNG_ERR] = u8"スクショ保存失敗",
	[ZTXT_UNSUPPORTED] = u8"非対応",
};

static const char*
lang_tr_tr[ZTXT__MAX] =
{
	[ZTXT_QEMU] = u8"QEMU",
	[ZTXT_PATH] = u8"Yolu",
	[ZTXT_ARCH] = u8"Mimari",
	[ZTXT_CPU] = u8"CPU",
	[ZTXT_SMP] = u8"SMP",
	[ZTXT_NAME] = u8"Adı",
	[ZTXT_MODEL] = u8"Model",
	[ZTXT_MACHINE] = u8"Makine",
	[ZTXT_HYPER_V] = u8"Hyper-V",
	[ZTXT_KERNEL_IRQCHIP] = u8"IRQ Çipi",
	[ZTXT_VIRT] = u8"Sanallaştırma",
	[ZTXT_MEMORY] = u8"Bellek",
	[ZTXT_SIZE] = u8"Boyutu",
	[ZTXT_FIRMWARE] = u8"Donanım",
	[ZTXT_TYPE] = u8"Türü",
	[ZTXT_OPTIONS] = u8"Seçenekler",
	[ZTXT_BOOT_MENU] = u8"Önyükleme Menüsü",
	[ZTXT_TIMEOUT] = u8"Zaman Aşımı",
	[ZTXT_PFLASH] = u8"pflash",
	[ZTXT_DISPLAY] = u8"Ekran",
	[ZTXT_FULLSCREEN] = u8"Tam Ekran",
	[ZTXT_NETWORK] = u8"Ağ",
	[ZTXT_MAC_ADDRESS] = u8"MAC",
	[ZTXT_PERIPHERAL] = u8"Bilgisayar",
	[ZTXT_USB] = u8"USB",
	[ZTXT_KEYBOARD] = u8"Klavye",
	[ZTXT_MOUSE] = u8"Fare",
	[ZTXT_TABLET] = u8"Tablet",
	[ZTXT_AUDIO] = u8"Ses",
	[ZTXT_BACKEND] = u8"Arka ucu",
	[ZTXT_INTEL_HDA] = u8"Intel HDA",
 	[ZTXT_PC_SPEAKER] = u8"PC Hoparlör",
	[ZTXT_BATTERY] = u8"Pil",
	[ZTXT_AC_POWER] = u8"AC Gücü",
	[ZTXT_BOOT_DEVICE] = u8"Önyükleme Aygıtı",
	[ZTXT_DISK_IMAGE] = u8"Disk Görüntüsü",
	[ZTXT_ISO_IMAGE] = u8"ISO Görüntüsü",
	[ZTXT_PHYSICAL_DISK] = u8"Fiziksel Disk",
	[ZTXT_CD_ROM] = u8"CD-ROM",
	[ZTXT_HARD_DISK] = u8"Sabit Disk",
	[ZTXT_FLOPPY] = u8"Disket",
	[ZTXT_FLOPPY_IMAGE] = u8"Disket Görüntüsü",
	[ZTXT_PXE] = u8"PXE",
	[ZTXT_BOOT_FILE] = u8"Önyükleme Dosyası",
	[ZTXT_HTTP] = u8"HTTP",
	[ZTXT_PORT] = u8"Bağlantı Noktası",
	[ZTXT_LINUX_KERNEL] = u8"Linux Çekirdek",
	[ZTXT_KERNEL] = u8"Çekirdek",
	[ZTXT_INITRD] = u8"INITRD",
	[ZTXT_CMDLINE] = u8"cmd satırı",
	[ZTXT_DTB] = u8"DTB",
	[ZTXT_SHIM_EFI] = u8"shim.efi",
	[ZTXT_WIM_IMAGE] = u8"WIM Görüntüsü",
	[ZTXT_WIM_INDEX] = u8"Görüntü Dizini",
	[ZTXT_DIR_VVFAT] = u8"Klasör (VVFAT)",
	[ZTXT_DIR] = u8"Klasör",
	[ZTXT_SNAPSHOT] = u8"Anlık Görüntü",
	[ZTXT_INTERFACE] = u8"Arayüz",
	[ZTXT_NO_DEVICE] = u8"AYGIT YOK",
	[ZTXT_ADDITIONAL] = u8"Ek Depolama",
	[ZTXT_FILE] = u8"Dosya",
	[ZTXT_DEVICE] = u8"Aygıt",
	[ZTXT_COPY] = u8"Kopyala",
	[ZTXT_SAVE] = u8"Kaydet",
	[ZTXT_START] = u8"BAŞLAT",
	[ZTXT_STOP] = u8"DURDUR",
	[ZTXT_SCREENSHOT] = u8"Ekran Görüntüsü",
	[ZTXT_SAVE_TO] = u8"Kaydetmek",
	[ZTXT_CLIPBOARD] = u8"Pano",
	[ZTXT_LOGS] = u8"Günlükler",
	[ZTXT_WARN_NOT_ADMIN] = u8"Yönetici ayrıcalıkları yok. Edinmek için tıklayın.",
	[ZTXT_WARN_NON_ASCII] = u8"Virgül veya ASCII karakter içeren yol DESTEKLENMEZ",
	[ZTXT_WARN_OUT_OF_MEM] = u8"Kullanılabilir bellek yetersiz olabilir",
	[ZTXT_WARN_FULLSCREEN] = u8"Tam ekran modu etkin, geçiş için Ctrl+Alt+F basın",
	[ZTXT_WARN_NOT_BOOTABLE] = u8"Görüntü önyüklenebilir olmayabilir",
	[ZTXT_MSG_COPIED] = u8"Panoya kopyalandı",
	[ZTXT_MSG_SAVED] = u8"Yapılandırma kaydedildi",
	[ZTXT_MSG_MISSING_ARGS] = u8"Eksik argümanlar",
	[ZTXT_MSG_KILLED] = u8"QEMU işlemi sonlandırıldı",
	[ZTXT_MSG_KILL_FAILED] = u8"QEMU işlemi sonlandırılamadı",
	[ZTXT_MSG_PNG_OK] = u8"Ekran görüntüsü kaydedildi",
	[ZTXT_MSG_PNG_ERR] = u8"Ekran görüntüsü kaydedilemedi",
	[ZTXT_UNSUPPORTED] = u8"Desteklenmiyor",
};

// https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
static LANGID static_lang_id;

const char*
ZTXT(GETTEXT_STR_ID id)
{
	if (static_lang_id == 0)
		static_lang_id = GetUserDefaultUILanguage();
	if (id >= ZTXT__MAX)
		return INVALID_ZTXT_ID;

	const char* str = NULL;
	switch (static_lang_id)
	{
	case 2052: // Chinese - People's Republic of China
		str = lang_zh_cn[id];
		break;
	case 1028: // Chinese - Taiwan
		str = lang_zh_tw[id];
		break;
	case 1041: // Japanese
		str = lang_ja_jp[id];
		break;
	case 1055: // Türkçe - Türkiye Cumhuriyeti
		str = lang_tr_tr[id];
		break;
	}
	// 1033: English - United States
	if (str == NULL)
		str = lang_en_us[id];
	return str;
}

