summaryrefslogtreecommitdiff
path: root/framework/I18N
diff options
context:
space:
mode:
Diffstat (limited to 'framework/I18N')
-rw-r--r--framework/I18N/TGlobalization.php16
-rw-r--r--framework/I18N/TTranslateParameter.php14
2 files changed, 30 insertions, 0 deletions
diff --git a/framework/I18N/TGlobalization.php b/framework/I18N/TGlobalization.php
index 0900943e..1f568a27 100644
--- a/framework/I18N/TGlobalization.php
+++ b/framework/I18N/TGlobalization.php
@@ -140,6 +140,22 @@ class TGlobalization extends TModule
}
/**
+ * @return string current translation catalogue.
+ */
+ public function getTranslationCatalogue()
+ {
+ return $this->_translation['catalogue'];
+ }
+
+ /**
+ * @param string update the translation catalogue.
+ */
+ public function setTranslationCatalogue($value)
+ {
+ return $this->_translation['catalogue'] = $value;
+ }
+
+ /**
* @return string default charset set in application.xml
*/
public function getDefaultCharset()
diff --git a/framework/I18N/TTranslateParameter.php b/framework/I18N/TTranslateParameter.php
index d00e33bb..ad87b8e6 100644
--- a/framework/I18N/TTranslateParameter.php
+++ b/framework/I18N/TTranslateParameter.php
@@ -59,6 +59,7 @@ class TTranslateParameter extends TControl
* @var boolean
*/
protected $trim = true;
+
/**
* Get the parameter substitution key.
@@ -98,11 +99,24 @@ class TTranslateParameter extends TControl
return $this->trim;
}
+ public function getValue()
+ {
+ return $this->getViewState('Value', '');
+ }
+
+ public function setValue($value)
+ {
+ $this->setViewState('Value', $value, '');
+ }
+
/**
* @return string parameter contents.
*/
public function getParameter()
{
+ $value = $this->getValue();
+ if(strlen($value) > 0)
+ return $value;
$textWriter = new TTextWriter;
$this->renderControl(new THtmlWriter($textWriter));
return $this->getTrim() ?