diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-24 11:03:22 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-24 11:03:22 -0500 |
| commit | 361efbc07e83ec79a19d96b34aa1913dce1d0e1d (patch) | |
| tree | 9d0655556ae0011fdc2ed4f8917faeb5efe29616 /indra/newview/lltranslate.cpp | |
| parent | 9e6a5d721193f181c39e58fe00073bece74b081a (diff) | |
| parent | 79f1cd0a73bd86ff545ad78b9b1878e350d77416 (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; |
