This commit is contained in:
2023-01-17 12:03:30 +08:00
parent 749efe4f69
commit c771f6a63f
3 changed files with 15 additions and 3 deletions
+3 -3
View File
@@ -22,9 +22,9 @@ int main(){
system("apt install -y language-pack-zh-hans");
system("locale-gen zh_CN.UTF-8");
system("mv /etc/default/locale /etc/default/locale.backup");
system("touch /etc/default/locale");
system("echo LANG=\"zh_CN.UTF-8\" > /etc/default/locale");
system("echo LANGUAGE=\"zh_CN:zh\" > /etc/default/locale");
system("wget https://raw.githubusercontent.com/TheWhiteDog9487/ubuntu-language-onekey-zh_cn/main/locale");
system("mv locale /etc/default/locale");
system("chmod 644 /etc/default/locale");
cout << "原/etc/default/locale已经备份为/etc/default/locale.backup" << endl;
cout << "即将重启以应用语言设置,请保存您未完成的工作以防数据丢失" << endl;
cout << "输入y或者yes重启或者按Ctrl+C终止本程序" << endl;