AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1139443
Accepted
Carolus
Carolus
Asked: 2019-05-01 06:44:54 +0800 CST2019-05-01 06:44:54 +0800 CST 2019-05-01 06:44:54 +0800 CST

哪些变量控制 Firefox 中时间和日期的格式,还有什么影响?

  • 772

我的主要问题是:

  1. 哪些 (env) 变量控制着 Firefox 中时间和日期的格式,还有什么影响(UI、拼写检查)?

我尝试更改语言环境设置、软件包、Firefox 语言包和 Firefox 设置,但我想不出一个组合来再次给我想要的结果:

  1. 如何在 en-US 中使用 Firefox(拼写检查和不太重要的 UI),但时间以 24 小时格式显示(日期显示为除 mm DD yy 之外的任何内容)?

在某些以前版本的 Kubuntu 中,我通过将语言环境的一些常规部分设置为 en-GB 来“修复”我的问题,但这具有将 Pidgin 的拼写检查从 en-US 更改为 en-GB 的不良副作用。这次我什至无法重现该结果(尽管一直在做笔记)。

我尝试了 StackExchange 和其他地方的许多建议,但没有一个对我有用。幸运的是,我在绝望中记得除了在 StackExchange 上回答问题外,我还可以提问!


输出和状态:

我在 Kubuntu 18.04 上使用 Firefox 66.0.3(64 位)。

在 Firefox > Addons > Languages 中,我安装了 en-US 和 en-GB。

在 Firefox > Preferences > Language and Appearance > Language:对于 UI 语言和网站显示语言,我尝试了 en-US 和 en-GB,没有任何更改。

在 chrome://global/locale/intl.properties 的 Firefox 中:

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# LOCALIZATION NOTE (intl.accept_languages):
# This is a comma-separated list of valid BCP 47 language tags.
#
# Begin with the language tag of your locale. Next, include language
# tags for other languages that you expect most users of your locale to be
# able to speak, so that their browsing experience degrades gracefully if
# content is not available in their primary language.
#
# It is recommended that you include "en-US, en" at the end of the list as a
# last resort. However, if you know that users of your locale would prefer a
# different variety of English, or if they are not likely to understand
# English at all, you may opt to include a different English language tag, or
# to exclude English altogether.
#
# For example, the Breton [br] locale might consider including French and
# British English in their list, since those languages are commonly spoken in
# the same area as Breton:
# intl.accept_languages=br, fr-FR, fr, en-GB, en
intl.accept_languages=en-US, en

# LOCALIZATION NOTE (font.language.group):
# This preference controls the initial setting of the language drop-down menu
# in the Content > Fonts & Colors > Advanced preference panel.
#
# Set it to the value of one of the menuitems in the "selectLangs" menulist in
# http://dxr.mozilla.org/mozilla-central/source/browser/components/preferences/fonts.xul
font.language.group=x-western

# LOCALIZATION NOTE (intl.charset.detector):
# This preference controls the initial setting for the character encoding
# detector. Valid values are ja_parallel_state_machine for Japanese, ruprob
# for Russian and ukprob for Ukrainian and the empty string to turn detection
# off. The value must be empty for locales other than Japanese, Russian and
# Ukrainian.
intl.charset.detector=

# LOCALIZATION NOTE (pluralRule): Pick the appropriate plural rule for your
# language. This will determine how many plural forms of a word you will need
# to provide and in what order.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
pluralRule=1

# LOCALIZATION NOTE (intl.menuitems.alwaysappendaccesskeys, intl.menuitems.insertseparatorbeforeaccesskeys):
# Valid values are: true, false, <empty string>
# Missing preference or empty value equals false.
intl.menuitems.alwaysappendaccesskeys=
intl.menuitems.insertseparatorbeforeaccesskeys=true

输出locale:

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE=C
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=et_EE.UTF-8
LC_NAME=et_EE.UTF-8
LC_ADDRESS=et_EE.UTF-8
LC_TELEPHONE=et_EE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=et_EE.UTF-8
LC_ALL=

输出printenv | grep LC_:

LC_MEASUREMENT=de_DE.UTF-8
LC_PAPER=et_EE.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_NAME=et_EE.UTF-8
LC_COLLATE=C
LC_ADDRESS=et_EE.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TELEPHONE=et_EE.UTF-8
LC_IDENTIFICATION=et_EE.UTF-8
LC_TIME=en_GB.UTF-8

输出localectl status:

   System Locale: LANG=en_US.UTF-8
                  LC_NUMERIC=et_EE.UTF-8
                  LC_TIME=et_EE.UTF-8
                  LC_MONETARY=et_EE.UTF-8
                  LC_PAPER=et_EE.UTF-8
                  LC_NAME=et_EE.UTF-8
                  LC_ADDRESS=et_EE.UTF-8
                  LC_TELEPHONE=et_EE.UTF-8
                  LC_MEASUREMENT=et_EE.UTF-8
                  LC_IDENTIFICATION=et_EE.UTF-8
       VC Keymap: n/a
      X11 Layout: us
       X11 Model: pc105

输出locale -a:

C
C.UTF-8
POSIX
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
et_EE.utf8

如果我从终端启动 Firefox,我会收到以下警告,也许这也是相关的:

(firefox:15865): Gtk-WARNING **: 17:27:21.499: Locale not supported by C library.
        Using the fallback 'C' locale.

(/usr/lib/firefox/firefox:15933): Gtk-WARNING **: 17:27:21.873: Locale not supported by C library.
        Using the fallback 'C' locale.

(/usr/lib/firefox/firefox:15982): Gtk-WARNING **: 17:27:22.569: Locale not supported by C library.
        Using the fallback 'C' locale.

(/usr/lib/firefox/firefox:16024): Gtk-WARNING **: 17:27:24.441: Locale not supported by C library.
        Using the fallback 'C' locale.

(/usr/lib/firefox/firefox:16152): Gtk-WARNING **: 17:27:26.382: Locale not supported by C library.
        Using the fallback 'C' locale.
firefox kubuntu locale
  • 1 1 个回答
  • 162 Views

1 个回答

  • Voted
  1. Best Answer
    Carolus
    2020-09-15T10:59:08+08:002020-09-15T10:59:08+08:00

    我使用的是 German locale de_DE.UTF-8,但它的输出中缺少locale -a(如问题中所示)。

    解决方案(感谢@GunnarHjalmarsson)也是通过以下方式生成:

    sudo locale-gen de_DE.UTF-8
    
    • 1

相关问题

  • 有没有办法让 Debootstrap 自动配置语言环境?

  • 如何解决 Firefox 中的字体问题?

  • 为什么我的 Kubuntu 会话在恢复后需要相当长的时间才能响应?

  • 使用突触或通过 Firefox 的插件菜单安装 adblock?

  • Firefox 的 Ubuntu Firefox 修改扩展有什么作用?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve