这可能不是操作系统问题,而是特定应用程序 (LibreOffice Calc) 的问题。
我创建并编译了一个自定义区域设置:
$ set |grep LANG=
LANG=en_XX.UTF-8
$ cat /usr/share/i18n/locales/en_XX
comment_char %
escape_char /
% This file is part of the GNU C Library and contains locale data.
% The Free Software Foundation does not claim any copyright interest
% in the locale data contained in this file. The foregoing does not
% affect the license of the GNU C Library as a whole. It does not
% exempt you from the conditions of the license if your use would
% otherwise be governed by that license.
% Locale for English locale in the USA
% Contributed by Ulrich Drepper <[email protected]>, 2000
% EDITED BY v010dya
LC_IDENTIFICATION
title "English locale for the V010DYA"
source "FSF and v010dya"
address "https:////www.gnu.org//software//libc//"
contact ""
email "[email protected]"
tel ""
fax ""
language "British English"
territory "Russia"
revision "1.0"
date "2000-06-24"
category "i18n:2012";LC_IDENTIFICATION
category "i18n:2012";LC_CTYPE
category "i18n:2012";LC_COLLATE
category "i18n:2012";LC_TIME
category "i18n:2012";LC_NUMERIC
category "i18n:2012";LC_MONETARY
category "i18n:2012";LC_MESSAGES
category "i18n:2012";LC_PAPER
category "i18n:2012";LC_NAME
category "i18n:2012";LC_ADDRESS
category "i18n:2012";LC_TELEPHONE
category "i18n:2012";LC_MEASUREMENT
END LC_IDENTIFICATION
LC_CTYPE
copy "en_GB"
END LC_CTYPE
LC_COLLATE
% Copy the template from ISO/IEC 14651
copy "iso14651_t1"
END LC_COLLATE
LC_MONETARY
int_curr_symbol "USD "
currency_symbol "$"
mon_decimal_point ","
mon_thousands_sep "<U202F>"
mon_grouping 3;3
positive_sign ""
negative_sign "-"
int_frac_digits 2
frac_digits 2
p_cs_precedes 1
int_p_sep_by_space 1
p_sep_by_space 0
n_cs_precedes 1
int_n_sep_by_space 1
n_sep_by_space 0
p_sign_posn 1
n_sign_posn 1
%
END LC_MONETARY
LC_NUMERIC
decimal_point ","
thousands_sep "<U202F>"
grouping 3;3
END LC_NUMERIC
LC_TIME
abday "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
day "Sunday";/
"Monday";/
"Tuesday";/
"Wednesday";/
"Thursday";/
"Friday";/
"Saturday"
week 7;19971130;1
first_weekday 2
abmon "Jan";"Feb";/
"Mar";"Apr";/
"May";"Jun";/
"Jul";"Aug";/
"Sep";"Oct";/
"Nov";"Dec"
mon "January";/
"February";/
"March";/
"April";/
"May";/
"June";/
"July";/
"August";/
"September";/
"October";/
"November";/
"December"
% Appropriate date and time representation (%c)
d_t_fmt "%x %X"
%
% Appropriate date representation (%x)
d_fmt "%Y-%m-%d"
%
% Appropriate time representation (%X)
t_fmt "%H:%M:%S"
%
% Appropriate AM/PM time representation (%r)
t_fmt_ampm "%I:%M:%S %p"
%
% Appropriate date and time representation for date(1)
date_fmt "%a %d %b %Y %r %Z"
%
% Strings for AM/PM
%
am_pm "AM";"PM"
END LC_TIME
LC_MESSAGES
yesexpr "^[+1yY]"
noexpr "^[-0nN]"
yesstr "yes"
nostr "no"
END LC_MESSAGES
LC_PAPER
copy "i18n"
END LC_PAPER
LC_NAME
name_fmt "%d%t%g%t%m%t%f"
name_miss "Miss."
name_mr "Mr."
name_mrs "Mrs."
name_ms "Ms."
END LC_NAME
LC_ADDRESS
postal_fmt "%f%N%a%N%d%N%b%N%s %h %e %r%N%z %T%N%c%N"
country_name "<U0420><U043E><U0441><U0441><U0438><U044F>"
country_ab2 "RU"
country_ab3 "RUS"
country_num 643
country_car "RUS"
lang_name "<U0440><U0443><U0441><U0441><U043A><U0438><U0439>"
lang_ab "ru"
lang_term "rus"
lang_lib "rus"
END LC_ADDRESS
LC_TELEPHONE
tel_int_fmt "+%c %a %l"
int_prefix "7"
int_select "0~10"
END LC_TELEPHONE
LC_MEASUREMENT
copy "i18n"
END LC_MEASUREMENT
原因是我主要想要俄罗斯风格的数字、电话号码、一周的开始日等。但我想使用美元符号作为货币,英语周和月标签。以及另一种日期格式。
大多数事情似乎都有效,但是,当涉及 LibreOffice Calc 时,它坚持只允许我以非常奇怪的 M/D/Y 格式编辑日期。我什至不会非常介意像 D/M/Y 这样的事情,但这让我发疯。我试图四处询问,但我相信它正在尝试使用设置的区域设置。
我的区域设置文件中是否存在不正确的内容,导致 Calc 默认为 en_US?