summaryrefslogtreecommitdiff
path: root/framework/I18N/TGlobalizationAutoDetect.php
diff options
context:
space:
mode:
authorwei <>2007-01-14 02:10:24 +0000
committerwei <>2007-01-14 02:10:24 +0000
commit45b0fe42a979d444d547a5248eb2e9e915aaf16a (patch)
tree2480dae3350e4a70949956c41984cceb8dce3efc /framework/I18N/TGlobalizationAutoDetect.php
parent898049a4012eaecd99e7a418726215e656677809 (diff)
Add "block-content" to allow user comments on block level elements in quickstart docs.
Diffstat (limited to 'framework/I18N/TGlobalizationAutoDetect.php')
-rw-r--r--framework/I18N/TGlobalizationAutoDetect.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/I18N/TGlobalizationAutoDetect.php b/framework/I18N/TGlobalizationAutoDetect.php
index 7393d79a..442135ff 100644
--- a/framework/I18N/TGlobalizationAutoDetect.php
+++ b/framework/I18N/TGlobalizationAutoDetect.php
@@ -25,6 +25,8 @@ Prado::using('System.I18N.core.HTTPNegotiator');
*/
class TGlobalizationAutoDetect extends TGlobalization
{
+ private $_detectedLanguage;
+
public function init($xml)
{
parent::init($xml);
@@ -33,7 +35,15 @@ class TGlobalizationAutoDetect extends TGlobalization
$http = new HTTPNegotiator();
$languages = $http->getLanguages();
if(count($languages) > 0)
+ {
+ $this->_detectedLanguage=$languages[0];
$this->setCulture($languages[0]);
+ }
+ }
+
+ public function getDetectedLanguage()
+ {
+ return $this->_detectedLanguage;
}
}