diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8ab35c53..9ab270d0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -217,8 +217,7 @@ set_target_properties( exiv2lib_int PROPERTIES target_compile_definitions(exiv2lib PUBLIC - EXV_LOCALEDIR="../${CMAKE_INSTALL_LOCALEDIR}" - #EXV_LOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}" + EXV_LOCALEDIR="/../${CMAKE_INSTALL_LOCALEDIR}" ) if ( UNIX AND CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" ) diff --git a/src/exiv2.cpp b/src/exiv2.cpp index b4950734..7c54e401 100644 --- a/src/exiv2.cpp +++ b/src/exiv2.cpp @@ -29,12 +29,13 @@ #include // include local header files which are not part of libexiv2 -#include "exiv2app.hpp" -#include "getopt.hpp" #include "actions.hpp" -#include "utils.hpp" #include "convert.hpp" -#include "i18n.h" // NLS support. +#include "exiv2app.hpp" +#include "futils.hpp" +#include "getopt.hpp" +#include "i18n.h" // NLS support. +#include "utils.hpp" #include "xmp_exiv2.hpp" #include @@ -128,7 +129,8 @@ int main(int argc, char* const argv[]) { #ifdef EXV_ENABLE_NLS setlocale(LC_ALL, ""); - bindtextdomain(EXV_PACKAGE_NAME, EXV_LOCALEDIR); + const std::string localeDir = Exiv2::getProcessPath() + EXV_LOCALEDIR; + bindtextdomain(EXV_PACKAGE_NAME, localeDir.c_str()); textdomain(EXV_PACKAGE_NAME); #endif diff --git a/src/types.cpp b/src/types.cpp index f4862d3f..17ab051e 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -26,10 +26,11 @@ // ***************************************************************************** // included header files #include "types.hpp" -#include "i18n.h" // for _exvGettext -#include "unused.h" -#include "safe_op.hpp" #include "enforce.hpp" +#include "futils.hpp" +#include "i18n.h" // for _exvGettext +#include "safe_op.hpp" +#include "unused.h" // + standard includes #ifdef EXV_UNICODE_PATH @@ -727,7 +728,9 @@ const char* _exvGettext(const char* str) static bool exvGettextInitialized = false; if (!exvGettextInitialized) { - bindtextdomain(EXV_PACKAGE_NAME, EXV_LOCALEDIR); + //bindtextdomain(EXV_PACKAGE_NAME, EXV_LOCALEDIR); + const std::string localeDir = Exiv2::getProcessPath() + EXV_LOCALEDIR; + bindtextdomain(EXV_PACKAGE_NAME, localeDir.c_str()); # ifdef EXV_HAVE_BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset (EXV_PACKAGE_NAME, "UTF-8"); # endif