summaryrefslogtreecommitdiff
path: root/i18npool/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-02-16 02:29:18 +0100
committerEike Rathke <erack@redhat.com>2013-02-18 17:51:20 +0100
commit8d23b47454043122b61b2e1dc08d84ee09e1a081 (patch)
treed68c29c7cecad732c1f1f37501934a8ea3a6d4a0 /i18npool/inc
parentca04dec8b9670d936395771da43818f00e670482 (diff)
added LanguageTag::getFallbackStrings()
Change-Id: Ia597cb184e0402e776cde50967541f008e22d4c9
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/i18npool/languagetag.hxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx
index 3394c1b99fa8..324fcd3da165 100644
--- a/i18npool/inc/i18npool/languagetag.hxx
+++ b/i18npool/inc/i18npool/languagetag.hxx
@@ -16,6 +16,8 @@
#include <i18npool/i18npooldllapi.h>
#include <i18npool/lang.h>
+#include <vector>
+
typedef struct _rtl_Locale rtl_Locale; // as in rtl/locale.h
@@ -212,6 +214,25 @@ public:
*/
LanguageTag & makeFallback();
+ /** Return a vector of fall-back strings.
+
+ In order:
+ full BCP 47 tag, same as getBcp47()
+ lll-Ssss-CC
+ lll-Ssss
+ lll-CC
+ lll
+
+ Only strings that differ from a higher order are included, for example
+ if there is no script the elements will be bcp47, lll-CC, lll; if the
+ bcp47 string is identical to lll-CC then only lll-CC, lll.
+
+ Note that lll is only ISO 639-1/2 alpha code and CC is only ISO 3166
+ alpha code. If the region can not be expressed as ISO 3166 then no -CC
+ tags are included.
+ */
+ ::std::vector< OUString > getFallbackStrings() const;
+
/* Test equality of two LangageTag. */
bool operator==( const LanguageTag & rLanguageTag ) const;