summaryrefslogtreecommitdiff
path: root/indra/newview/lltranslate.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-01-05 10:59:29 -0800
committerRichard Linden <none@none>2012-01-05 10:59:29 -0800
commit66fcc2da3925cd16939e4438dad749b2c22dbc27 (patch)
tree771fe7786750454ad478773d7045accb4a353b53 /indra/newview/lltranslate.cpp
parent570d562f5871f40bd7f8c683db5316ffd0133335 (diff)
parent9c8f6ba6a51b799d16e89e995bbcf3b0dcc15c62 (diff)
Automated merge with https://bitbucket.org/lindenlab/viewer-development
Diffstat (limited to 'indra/newview/lltranslate.cpp')
-rwxr-xr-xindra/newview/lltranslate.cpp18
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;