Define a new environment variable to determine the directory where message catalogs ('.mo' files) are to be be looked up. LibreOffice already has environment variables such as 'BRAND_BASE_DIR' and 'BRAND_SHARE_RESOURCE_SUBDIR' but these are not helpful in this case. Patch by Ludovic Courtès . --- libreoffice-6.1.5.2/unotools/source/i18n/resmgr.cxx 2019-03-10 16:22:21.352963608 +0100 +++ libreoffice-6.1.5.2/unotools/source/i18n/resmgr.cxx 2019-03-10 16:30:20.090848346 +0100 @@ -144,6 +144,11 @@ namespace Translate rtl::Bootstrap::expandMacros(uri); OUString path; osl::File::getSystemPathFromFileURL(uri, path); + + const char *cLocaleDir = ::getenv("LO_LOCALE_DIRECTORY"); + if (cLocaleDir != NULL) + path = OUString::createFromAscii(cLocaleDir); + OString sPath(OUStringToOString(path, osl_getThreadTextEncoding())); gen.add_messages_path(sPath.getStr()); #if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID