private function get_global_strings(&$form, $st_context)
 {
     $snh = new GFML_String_Name_Helper();
     if (isset($form['title'])) {
         $form['title'] = icl_t($st_context, $snh->get_form_title(), $form['title']);
     }
     if (isset($form['description'])) {
         $form['description'] = icl_t($st_context, $snh->get_form_description(), $form['description']);
     }
     if (isset($form['button']['text'])) {
         $form['button']['text'] = icl_t($st_context, $snh->get_form_submit_button(), $form['button']['text']);
     }
     $this->get_notifications($form, $st_context);
     $this->get_confirmations($form, $st_context);
 }
Ejemplo n.º 2
0
 protected function register_global_strings($form_package, $form)
 {
     $snh = new GFML_String_Name_Helper();
     if (isset($form['title'])) {
         $string_title = 'Form title';
         $this->register_gf_string($form['title'], $snh->get_form_title(), $form_package, $string_title);
     }
     if (isset($form['description'])) {
         $string_title = 'Form description';
         $this->register_gf_string($form['description'], $snh->get_form_description(), $form_package, $string_title, 'AREA');
     }
     if (isset($form['button']['text'])) {
         $string_title = 'Form submit button';
         $this->register_gf_string($form['button']['text'], $snh->get_form_submit_button(), $form_package, $string_title);
     }
     $this->register_form_notifications($form_package, $form);
     $this->register_form_confirmations($form_package, $form);
 }