Merge pull request #4274 from mrpaulc/CRM-14868
[civicrm-core.git] / CRM / Admin / Form / Setting / Component.php
index ec318c30030e1b11da2b32978f386c5f2ecad493..4bc635e2715115a1986036ca982f107b8f63b2a1 100644 (file)
@@ -131,9 +131,16 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting {
       die("Cannot open $dsn: " . $db->getMessage());
     }
 
+    $domain = new CRM_Core_DAO_Domain();
+    $domain->find(TRUE);
+    $multiLingual = (bool) $domain->locales;
+    $smarty = CRM_Core_Smarty::singleton();
+    $smarty->assign('multilingual', $multiLingual);
+    $smarty->assign('locales', explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales));
+
     if (!$lineMode) {
-      $string = file_get_contents($fileName);
 
+      $string = $smarty->fetch($fileName);
       // change \r\n to fix windows issues
       $string = str_replace("\r\n", "\n", $string);