From 878594f4795cad21bee5567d8abfe55d567a449e Mon Sep 17 00:00:00 2001 From: Philip Rinn Date: Wed, 23 Jan 2013 17:31:10 +0100 Subject: [PATCH] Add auto-detection of user language on Mac OS X (closes issue 1687) --- rtgui/multilangmgr.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rtgui/multilangmgr.cc b/rtgui/multilangmgr.cc index a53c0a19a..7c6185356 100644 --- a/rtgui/multilangmgr.cc +++ b/rtgui/multilangmgr.cc @@ -102,7 +102,7 @@ bool MultiLangMgr::isOSLanguageDetectSupported() { #else return false; #endif -#elif __linux__ +#elif __linux__ || __APPLE__ return true; #else return false; @@ -116,7 +116,6 @@ Glib::ustring MultiLangMgr::getOSUserLanguage() { if (isOSLanguageDetectSupported()) { - // TODO: Add support for other OS here #ifdef WIN32 // When using old versions of MINGW this is not defined #ifdef __MINGW64_VERSION_MAJOR @@ -130,7 +129,7 @@ Glib::ustring MultiLangMgr::getOSUserLanguage() { langName=TranslateRFC2Language(localRFC); } #endif -#elif __linux__ +#elif __linux__ || __APPLE__ langName = TranslateRFC2Language(std::setlocale(LC_CTYPE,"")); #endif }