diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-09 09:47:19 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-09 09:47:19 -0500 |
commit | 3ed8f8907665d8700199a1181a5dd106a6804edb (patch) | |
tree | 3c41a427dfbae7e14272ccd64d2f6bf47bf70216 /indra/newview/lltranslate.cpp | |
parent | 837e38d8195b2928648c9c383bea1b3f1cf68fa5 (diff) | |
parent | 41ceee848bbbaec892471b6396bd2d2383d10aa3 (diff) |
merge
Diffstat (limited to 'indra/newview/lltranslate.cpp')
-rwxr-xr-x | indra/newview/lltranslate.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 7eb54271f4..c1cc9c7bc4 100755 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -95,6 +95,12 @@ bool LLGoogleTranslationHandler::parseResponse( return parseTranslation(root, translation, detected_lang); } +// virtual +bool LLGoogleTranslationHandler::isConfigured() const +{ + return !getAPIKey().empty(); +} + // static void LLGoogleTranslationHandler::parseErrorResponse( const Json::Value& root, @@ -218,6 +224,12 @@ bool LLBingTranslationHandler::parseResponse( return true; } +// virtual +bool LLBingTranslationHandler::isConfigured() const +{ + return !getAPIKey().empty(); +} + // static std::string LLBingTranslationHandler::getAPIKey() { @@ -332,6 +344,12 @@ std::string LLTranslate::getTranslateLanguage() } // static +bool LLTranslate::isTranslationConfigured() +{ + return getPreferredHandler().isConfigured(); +} + +// static const LLTranslationAPIHandler& LLTranslate::getPreferredHandler() { EService service = SERVICE_BING; |