summaryrefslogtreecommitdiff
path: root/include/i18nlangtag
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-08-23 22:27:14 +0200
committerEike Rathke <erack@redhat.com>2013-08-23 23:09:09 +0200
commit087ee66013916bd009eb0b29460ef1868b4d755c (patch)
tree04a68244e9fe87f35b46afbe1bb06d8331be3a9c /include/i18nlangtag
parent5b2a740b9cacd1e0e4d2164647e89fb6b1e6c39e (diff)
encapsulate IsoLangEntry again
Change-Id: I66475eb3914b07b4c7a045e295ef77a5de9439d4
Diffstat (limited to 'include/i18nlangtag')
-rw-r--r--include/i18nlangtag/mslangid.hxx24
1 files changed, 9 insertions, 15 deletions
diff --git a/include/i18nlangtag/mslangid.hxx b/include/i18nlangtag/mslangid.hxx
index 37bc72898e15..14386eccc504 100644
--- a/include/i18nlangtag/mslangid.hxx
+++ b/include/i18nlangtag/mslangid.hxx
@@ -25,6 +25,7 @@
#include "i18nlangtag/i18nlangtagdllapi.h"
#include "i18nlangtag/lang.h"
#include <com/sun/star/lang/Locale.hpp>
+#include <vector>
/** Methods related to Microsoft language IDs. For details about MS-LANGIDs
please see lang.h */
@@ -173,26 +174,19 @@ public:
// ---------------------------------------------------------------------------
- /** @internal - Access to fields of an element of the simple conversion table.
- For resource compiler build environment usage only! */
- struct IsoLangEntry
+ struct LanguagetagMapping
{
- LanguageType mnLang;
- sal_Char maLangStr[4];
- sal_Char maCountry[3];
+ OUString maBcp47;
+ LanguageType mnLang;
- /** Obtain a language tag string with '-' separator. */
- I18NLANGTAG_DLLPUBLIC OUString getTagString() const;
+ LanguagetagMapping( const OUString & rBcp47, LanguageType nLang ) : maBcp47(rBcp47), mnLang(nLang) {}
};
- /** @internal - Return a pointer to the IsoLangEntry of the underlying table,
- matching the offset passed by nIndex. Only meaningful for the resource
- compiler to build a list of known languages.
-
- @returns address of IsoLangEntry, or NULL pointer if nIndex exceeds the
- table elements' count.
+ /** @internal - Obtain a list of known locales (i.e. those that have a
+ defined mapping between MS-LangID and ISO codes or tags) as BCP 47
+ language tag strings.
*/
- static const IsoLangEntry* getIsoLangEntry( size_t nIndex );
+ static ::std::vector< LanguagetagMapping > getDefinedLanguagetags();
// ---------------------------------------------------------------------------