https://bugs.documentfoundation.org/show_bug.cgi?id=154155
Bug ID: 154155
Summary: Support [$-BCP-47] syntax to define a custom number
format's locale
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
In our number format syntax [1], it is possible to define a locale used for the
number formatting: [$-lcid] or [$xxx-lcid]; and the lcid is defined as a
hexadecimal number defined in [MS-LCID].
Microsoft has deprecated the use of LCIDs (as described in the Overview section
of [MS-LCID]); and "locale names" are encouraged instead. LCIDs are not
guaranteed to be available for any given locale.
The use of "locale names" (i.e., BCP-47 language tags) is also much more
user-friendly and intuitive: e.g., when asked today for a way to force
"[NatNum12]0" to "language Marathi ( mr-IN )", I would be glad to be able to
respond like "use [NatNum12][$-mr-IN]0"; but instead, I needed to lookup the
LCID, and the result would be "[NatNum12][$-44e]0".
Let us support this [$-BCP-47] (and [$xxx-BCP-47]) syntax, in addition to the
one using LCIDs. This wouldn't introduce a potential for backward
incompatibility, because currently, such syntax would produce an error (e.g.,
"=TEXT(123; "[$-en-US]0")" gives Err:502, and trying to define it as a cell's
number format is rejected). Potentially, this new format could become the
preferred one, keeping the LCIDs for backward compatibility only.
Additionally, only format strings saved verbatim (e.g., in TEXT spreadsheet
function argument, or in Basic's Format function argument, or passed to
XNumberFormats::queryKey) would be incompatible when used in older versions,
because e.g. in cell/field format strings, they would become cell locale
instead, saved compatibly.
[1] https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html
[MS-LCID]
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c
--
You are receiving this mail because:
You are the assignee for the bug.