summaryrefslogtreecommitdiff
path: root/unotools/source/i18n/resmgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unotools/source/i18n/resmgr.cxx')
-rw-r--r--unotools/source/i18n/resmgr.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index 6d66728f415f..f93e943b628a 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -200,10 +200,12 @@ namespace Translate
assert(!strchr(sContextAndId.getId(), '\004') && "should be using nget, not get");
//if it's a key id locale, generate it here
- if (std::use_facet<boost::locale::info>(loc).language() == "qtz")
- {
- OString sKeyId(genKeyId(OString::Concat(sContextAndId.mpContext) + "|" + std::string_view(sContextAndId.getId())));
- return OUString::fromUtf8(sKeyId) + u"\u2016" + OUString::fromUtf8(sContextAndId.getId());
+ if (std::has_facet<boost::locale::info>(loc)) {
+ if (std::use_facet<boost::locale::info>(loc).language() == "qtz")
+ {
+ OString sKeyId(genKeyId(OString::Concat(sContextAndId.mpContext) + "|" + std::string_view(sContextAndId.getId())));
+ return OUString::fromUtf8(sKeyId) + u"\u2016" + OUString::fromUtf8(sContextAndId.getId());
+ }
}
//otherwise translate it