问题:
在设置 -> 区域设置中,我添加了语言马拉地语和印地语,以查看它的工作原理和翻译内容(我知道马拉地语和印地语)。重新启动后,语言更改为马拉地语。现在,我想恢复为英语,因为那是我在处理计算机时习惯使用的语言。但是,当我单击 Add Languages... 按钮时,没有任何反应,也没有出现对话框。因此,我无法将语言更改为任何其他语言,除了作为添加语言存在的语言。
重现步骤:
转到设置->区域设置->单击添加语言...->添加印地语-हिंदी(或马拉地语-मराठी,其他人可能不会给出相同的结果,不知道)->单击应用->重新启动计算机->开始到 तंत्र विन्यास (प्रणाली संयोजना) -> 区域设置 -> 单击添加语言...
我试过的:
- LANGUAGE 环境变量在哪里设置?
- 语言环境:重置丢失的设置
- https://stackoverflow.com/questions/27387199/how-to-change-the-language-locale-for-the-ubuntu-terminal
- https://websiteforstudents.com/how-to-change-to-your-native-language-on-ubuntu-17-10/
- https://www.shellhacks.com/linux-define-locale-language-settings/
- 有些菜单是中文/日文的!
附加信息:
系统设置有时会崩溃。
崩溃日志:
Application: प्रणाली संयोजना (systemsettings5), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f395cdb46c0 (LWP 3574))]
Thread 7 (Thread 0x7f393b5ef700 (LWP 3583)):
#0 __GI___libc_read (nbytes=16, buf=0x7f393b5eeb20, fd=18) at ../sysdeps/unix/sysv/linux/read.c:26
#1 __GI___libc_read (fd=18, buf=0x7f393b5eeb20, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2 0x00007f395f16a410 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f395f1236cf in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007f395f123ba0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f395f123d1c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007f3961944063 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007f39618ef5bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007f396173a2c6 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007f3960a5cef5 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007f396173b612 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f395fbbb182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#12 0x00007f39613ceb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 6 (Thread 0x7f3946909700 (LWP 3582)):
#0 0x00007f395f16e809 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007f395f123b00 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f395f123d1c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f3961944063 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007f39618ef5bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007f396173a2c6 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007f3960a5cef5 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#7 0x00007f396173b612 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007f395fbbb182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#9 0x00007f39613ceb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 5 (Thread 0x7f3950a27700 (LWP 3580)):
#0 0x00007f39613c2729 in __GI___poll (fds=0x7f3940004a30, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007f395f123bf6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f395f123d1c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f3961944063 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007f39618ef5bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007f396173a2c6 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007f3960a5cef5 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#7 0x00007f396173b612 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007f395fbbb182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#9 0x00007f39613ceb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 4 (Thread 0x7f3953cb5700 (LWP 3578)):
#0 futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x560f3a7f1b2c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x560f3a7f1ad8, cond=0x560f3a7f1b00) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x560f3a7f1b00, mutex=0x560f3a7f1ad8) at pthread_cond_wait.c:655
#3 0x00007f39582fc36b in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4 0x00007f39582fc0d7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5 0x00007f395fbbb182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6 0x00007f39613ceb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7f395a806700 (LWP 3577)):
#0 __GI___libc_read (nbytes=16, buf=0x7f395a805b10, fd=7) at ../sysdeps/unix/sysv/linux/read.c:26
#1 __GI___libc_read (fd=7, buf=0x7f395a805b10, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2 0x00007f395f16a410 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f395f1236cf in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007f395f123ba0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f395f123d1c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007f3961944063 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007f39618ef5bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007f396173a2c6 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007f3961bbc565 in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007f396173b612 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f395fbbb182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#12 0x00007f39613ceb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 2 (Thread 0x7f395bd33700 (LWP 3576)):
#0 0x00007f39613c2729 in __GI___poll (fds=0x7f395bd32c68, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007f395fb78917 in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007f395fb7a53a in xcb_wait_for_event () from /lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007f395c7066a8 in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4 0x00007f396173b612 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007f395fbbb182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6 0x00007f39613ceb1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7f395cdb46c0 (LWP 3574)):
[KCrash Handler]
#6 0x0000560f42a72ff0 in ?? ()
#7 0x00007f396191f718 in QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007f3960901f9c in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#9 0x00007f39609022db in QV4::QObjectWrapper::wrap_slowPath(QV4::ExecutionEngine*, QObject*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007f396097f88c in QV4::ExecutionEngine::fromVariant(QVariant const&) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#11 0x00007f39608e02e5 in QV4::QQmlContextWrapper::virtualGet(QV4::Managed const*, QV4::PropertyKey, QV4::Value const*, bool*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#12 0x00007f396088648d in QV4::ExecutionContext::getProperty(QV4::String*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#13 0x00007f3960986d40 in QV4::Runtime::method_loadName(QV4::ExecutionEngine*, int) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#14 0x00007f39397e80d8 in ?? ()
#15 0x0000000000000000 in ?? ()
[Inferior 1 (process 3574) detached]
非常感谢任何帮助!
根本原因:
当我们通过System Settings > Regional Settings添加语言时,它被添加为 KDE Plasma(桌面环境)的语言而不是系统语言。因此,尽管系统语言显示为英语(
locale
在终端中运行),但我们仍然以区域设置中指定的语言看到我们的桌面。这也是为什么使用
sudo locale-gen en_US.UTF-8
或者sudo localectl set-locale LANG=en_US.utf8
或者export LANG=en_US.utf8
_~/.bashrc
source ~/.bashrc
不影响区域设置中设置的语言设置。
解决方案:
转到
~/.config/plasma-locale-settings.sh
,打开它并确保它包含以下内容:然后,转到
~/.config/plasma-localerc
,打开它并确保它包含以下内容:关闭计算机并重新启动。你应该回到英语。如果没有,请通过评论告诉我:)
我在我的系统上启用了Kubuntu backports ppa,因此我可能拥有比 vanilla Kubuntu 19.04 提供的更新版本的 Plasma。
操作系统:Kubuntu 19.04
KDE Plasma 版本:5.16.4
KDE Frameworks 版本:5.60.0
Qt 版本:5.12.2
内核版本:5.0.0-23-generic
操作系统类型:64 位
当我第一次打开System Settings > Regional Settings > Language时, Configure Plasma Translations下没有列出任何语言。所以我先加了美式英语,然后加了印地语。我尝试将马拉地语添加为第三种语言,这导致系统设置崩溃。所以我只保留了两种语言。
要切换语言,请单击列出所需语言的行,然后将其置于顶部,如图所示:
语言的变化需要注销:
如您所见,翻译是部分的。如果您有空余时间,翻译团队将不胜感激这方面的帮助。
这里的默认
locale
文件位置: /etc/default第 1 步:安装
nautilus-admin
然后注销和登录。第 2 步:转到/etc/default。
第3步:右键单击
locale
并以管理员身份编辑。像这样编辑
locale
文件并保存:完毕。现在注销并登录。