Ejemplo n.º 1
0
 private function AddLanguageField()
 {
     $name = 'Language';
     $field = new Select($name, $this->site->Exists() ? $this->site->GetLanguage()->GetID() : '');
     $field->AddOption('', Trans('Core.PleaseSelect'));
     DBSelectUtil::AddLanguageOptions($field);
     $this->AddField($field);
     $this->SetRequired($name);
 }
Ejemplo n.º 2
0
 /**
  * Loads backend translations of the bundle
  */
 private function LoadFrontendTranslations(Site $site)
 {
     $language = $site->GetLanguage()->GetCode();
     $frontendTranslations = PathUtil::FrontendBundleTranslationFile($this->BundleName(), $language);
     if (File::Exists($frontendTranslations)) {
         require_once $frontendTranslations;
     }
 }