Kaydet (Commit) f51aff9e authored tarafından Eike Rathke's avatar Eike Rathke

let IsoLangEntry decide how to form a language tag string

Change-Id: I868cd8ea0610b6b8dd8155cdc72f7d238f279ef2
üst f8e697ab
...@@ -180,6 +180,9 @@ public: ...@@ -180,6 +180,9 @@ public:
LanguageType mnLang; LanguageType mnLang;
sal_Char maLangStr[4]; sal_Char maLangStr[4];
sal_Char maCountry[3]; sal_Char maCountry[3];
/** Obtain a language tag string with '-' separator. */
OUString getTagString() const;
}; };
/** @internal - Return a pointer to the IsoLangEntry of the underlying table, /** @internal - Return a pointer to the IsoLangEntry of the underlying table,
......
...@@ -520,6 +520,14 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = ...@@ -520,6 +520,14 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
static MsLangId::IsoLangEntry aLastResortFallbackEntry = static MsLangId::IsoLangEntry aLastResortFallbackEntry =
{ LANGUAGE_ENGLISH_US, "en", "US" }; { LANGUAGE_ENGLISH_US, "en", "US" };
OUString MsLangId::IsoLangEntry::getTagString() const
{
if (maCountry[0])
return OUString( OUString::createFromAscii( maLangStr) + "-" + OUString::createFromAscii( maCountry));
else
return OUString::createFromAscii( maLangStr);
}
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// In this table are the countries which should mapped to a specific // In this table are the countries which should mapped to a specific
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment