Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Hi Khaled,

On Wednesday, 2017-02-15 15:35:59 +0200, Khaled Hosny wrote:

On Wed, Feb 15, 2017 at 12:42:22PM +0000, Caolán McNamara wrote:
Hmm, it seems language tags such as ‘nl’ or ‘fr’ without a region
component, and which are valid according to bcp47 are not recognized
by LO. Is this a bug I should report?

Only if you intend to work on solving it, is my opinion. It would be
nice to support a bare "language" dictionary and have it in use for all
variants unless there are more specific variants to use, but I don't
intend to do it myself, or think my way through hacking firefox,
enchant and the rest of the things that parse filenames in
/usr/share/myspell|hunspell to also support that.

Firefox has no problem using ar.{aff,dic} for Arabic, neither does
gtkspell (or whatever GTK+ apps use). Only LibreOffice (and OpenOffice
before it) has problem using such dictionaries, and it turn packagers
duplicates the dictionary files to support LibreOffice e.g. the
hunspell-ar package on Debian has tens of ar_XX.{aff,dic} symlinks just
because of this.

This has long annoyed me, and I might give it a try if there are some
code pointers.

Hum.. that might be related to how a language is mapped to a default
locale if there exists one with a country designator. It all happens in
i18nlangtag/source/languagetag/languagetag.cxx and
i18nlangtag/source/isolang/mslangid.cxx (where in the latter the tables
of known locales are).

However, there's LanguageTag::getFallbackStrings(), which using and
comparing against available dictionaries should work, and
LanguageTag::makeFallback() that returns a *known* *locale* (plus
getFallback() and getMatchingFallback() for different situations) which
currently may be used in the dictionary context but instead
getFallbackStrings() should be used. Try to grep for those.
If stuck ping me ;-)

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

Attachment: signature.asc
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.