diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-08-11 00:23:25 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-08-17 20:01:10 +0200 |
commit | 13db6e8671c36e1a028d6a8ad63f518e60f84870 (patch) | |
tree | 86560571d00c9069c33449865211606da9b6be14 /i18nlangtag | |
parent | da0dc858fc05e7f1d6a60ca61f722044e688d4f8 (diff) |
tdf#119117: get phonebook sort work by tweaking ICU call mechanism
Using "phonebook" as variant does't work with de_DE
since it gives de_DE_PHONEBOOK whereas icu expects de__PHONEBOOK
See http://userguide.icu-project.org/locale#TOC-Variant-code,
Level 2 canonicalization, 8.
So let variant empty and use the fourth arg of icuLocale "keywords"
See constructors in http://icu-project.org/apiref/icu4c/classicu_1_1Locale.html
Change-Id: I6c216c86cdd32abfa477c14a80d1b8794b536900
Reviewed-on: https://gerrit.libreoffice.org/58870
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'i18nlangtag')
-rw-r--r-- | i18nlangtag/source/languagetag/languagetagicu.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/i18nlangtag/source/languagetag/languagetagicu.cxx b/i18nlangtag/source/languagetag/languagetagicu.cxx index 33a98844043f..18d37f704773 100644 --- a/i18nlangtag/source/languagetag/languagetagicu.cxx +++ b/i18nlangtag/source/languagetag/languagetagicu.cxx @@ -35,13 +35,15 @@ icu::Locale LanguageTagIcu::getIcuLocale( const LanguageTag & rLanguageTag ) // static -icu::Locale LanguageTagIcu::getIcuLocale( const LanguageTag & rLanguageTag, const OUString & rVariant ) +icu::Locale LanguageTagIcu::getIcuLocale( const LanguageTag & rLanguageTag, const OUString & rVariant, const OUString & rKeywords ) { /* FIXME: how should this work with any BCP47? */ return icu::Locale( OUStringToOString( rLanguageTag.getLanguage(), RTL_TEXTENCODING_ASCII_US).getStr(), OUStringToOString( rLanguageTag.getCountry(), RTL_TEXTENCODING_ASCII_US).getStr(), - OUStringToOString( rVariant, RTL_TEXTENCODING_ASCII_US).getStr()); + OUStringToOString( rVariant, RTL_TEXTENCODING_ASCII_US).getStr(), + OUStringToOString( rKeywords, RTL_TEXTENCODING_ASCII_US).getStr() + ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |