https://bugs.documentfoundation.org/show_bug.cgi?id=103855

--- Comment #2 from martin_hos...@sil.org ---
I've been asked why the changes to a core file like languagetag.hxx?

The way much of the core applications are set up for language is via the use of
LanguageTypes which are a 16-bit id after a MSLangId. The particular query I am
needing to address is the ScriptType of a given LanguageType. The ScriptType
tells us what category of script is used for the language. Primarily this is
for the western vs ctl vs asian split that controls font and language selection
based on characters in the text, but also for rtl and cjk querying in other
areas.

One option would be to query the language tag and ask for its script. The
problem here is that most language tags and their users do specify the script
in the tag. There is a big ambiguous hole in the language tag standard that
says: if you do not have a suppress script for your language then you may use a
script sub tag, but that you SHOULD not include the script if it adds no extra
distinguishing information to the tag. Therefore, for most languages in the
world, there is no need or desire to specify the script. But that means for
languages with no suppress script information, we do not know what the default
script is for the language. If we were to specify that in some way to the
language tag, the language tag would still not know whether or not to include
the script in the tag when it canonicalises it. And so I decided not to take
this particular implementation down that rather windy rabbit warren.

LanguageTag has a nice internal map of LanguageType to LanguageTagImpl, and we
can store the ScriptType in the LanguageTagImpl, which means it is more stable
than in a LanguageTag that can get remade many times. But the only way to get
to the LanguageTagImpl interface and the map is via the LanguageTag interface.
Hence the changes I have had to make to that interface. Unfortunately, this
interface is referenced pretty much everywhere and the result is a large build
churn. The hope is that we can minimise any re-changes to this interface, which
is considered mature and we don't want to demature it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to