*/
private $codeEnd = '?>';
+ /**
+ * Language support is enabled by default
+ */
+ private $languageSupport = true;
+
// Exception codes for the template engine
const EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED = 0x110;
const EXCEPTION_TEMPLATE_CONTAINS_INVALID_VAR = 0x111;
$ext = (string) $extOther;
}
- // Construct the FQFN for the template by honoring the current language
- $fqfn = sprintf("%s%s%s%s/%s/%s%s",
- $this->getConfigInstance()->getConfigEntry('base_path'),
- $this->getTemplateBasePath(),
- $this->getGenericBasePath(),
- $this->getLanguageInstance()->getLanguageCode(),
- $this->getTemplateType(),
- (string) $template,
- $ext
- );
+ // Is language support enabled?
+ if ($this->isLanguageSupportEnabled()) {
+ // Construct the FQFN for the template by honoring the current language
+ $fqfn = sprintf("%s%s%s%s/%s/%s%s",
+ $this->getConfigInstance()->getConfigEntry('base_path'),
+ $this->getTemplateBasePath(),
+ $this->getGenericBasePath(),
+ $this->getLanguageInstance()->getLanguageCode(),
+ $this->getTemplateType(),
+ (string) $template,
+ $ext
+ );
+ } else {
+ // Construct the FQFN for the template without language
+ $fqfn = sprintf("%s%s%s%s/%s%s",
+ $this->getConfigInstance()->getConfigEntry('base_path'),
+ $this->getTemplateBasePath(),
+ $this->getGenericBasePath(),
+ $this->getTemplateType(),
+ (string) $template,
+ $ext
+ );
+ }
+ die($fqfn);
// First try this
try {
// Parse the XML document
$parserInstance->parseXmlContent($content);
}
+
+ /**
+ * Enables or disables language support
+ *
+ * @param $languageSupport New language support setting
+ * @return void
+ */
+ public final function enableLanguageSupport ($languageSupport = true) {
+ $this->languageSupport = (bool) $languageSupport;
+ }
+
+ /**
+ * Checks wether language support is enabled
+ *
+ * @return $languageSupport Wether language support is enabled or disabled
+ */
+ public final function isLanguageSupportEnabled () {
+ return $this->languageSupport;
+ }
}
// [EOF]