summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-04-24 22:55:43 +0200
committerEike Rathke <erack@redhat.com>2013-04-24 23:10:31 +0200
commit095f3dde425eb79da0e7fbfe40e18de1ac4f368b (patch)
treefc22271125013d978fe77effe3c790fcdf51cb6c /include
parent6681432e39228deb982105caa8de2319c2084a08 (diff)
introduced libi18nlangtagicu
Change-Id: Ie80e989d55d465e127ccc20290d654acf222e5bb
Diffstat (limited to 'include')
-rw-r--r--include/i18nlangtag/languagetag.hxx1
-rw-r--r--include/i18nlangtag/languagetagicu.hxx44
2 files changed, 45 insertions, 0 deletions
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx
index e5ba011ab2ba..15ca4ec8bbc5 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -393,6 +393,7 @@ private:
OUString& rLanguage,
OUString& rScript,
OUString& rCountry );
+
};
#endif // INCLUDED_I18NLANGTAG_LANGUAGETAG_HXX
diff --git a/include/i18nlangtag/languagetagicu.hxx b/include/i18nlangtag/languagetagicu.hxx
new file mode 100644
index 000000000000..20e5349f7875
--- /dev/null
+++ b/include/i18nlangtag/languagetagicu.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_I18NLANGTAG_LANGUAGETAGICU_HXX
+#define INCLUDED_I18NLANGTAG_LANGUAGETAGICU_HXX
+
+#include <sal/config.h>
+#include <i18nlangtag/i18nlangtagdllapi.h>
+#include <unicode/locid.h>
+
+class LanguageTag;
+
+
+/** Interface LanguageTag to ICU's icu::Locale
+
+ Separated from LanguageTag into its own library to not pollute the entire
+ code base with ICU header file inclusion and linkage, only the few code
+ actually using this needs to link against ICU libraries, which it did
+ anyway.
+*/
+class I18NLANGTAG_DLLPUBLIC LanguageTagIcu
+{
+public:
+
+ /** Obtain language tag as ICU icu::Locale.
+
+ If the language tag is a "pure" ISO locale (see
+ LanguageTag::getLocale()) that is directly constructed, otherwise it is
+ converted using the available ICU mechanisms.
+
+ Always resolves an empty tag to the system locale.
+ */
+ static icu::Locale getIcuLocale( const LanguageTag & rLanguageTag );
+};
+
+#endif // INCLUDED_I18NLANGTAG_LANGUAGETAGICU_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */