Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 7925)
+++ /controller/wpsg_AdminController.class.php	(revision 7926)
@@ -1270,61 +1270,102 @@
 		} // public function laenderAction()
 
-		public function wpmlAction()
-		{
-
-			if (isset($_REQUEST['wpsg_set_string_translation']))
-			{
-
-				if (!function_exists('icl_register_string')) throw new \wpsg\Exception(__('WPML ist nicht komplett Installiert (Funktion icl_register_string ist nicht erreichbar)', 'wpsg'));
-
-				// Alle Automatisch angelegten String-Ãbersetzungen lÃ¶schen
-				$arStringTrans = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `context` = 'wpsg' AND `name` LIKE 'wpsg_auto_%' ");
-
-				foreach ($arStringTrans as $st_id)
-				{
-
-					// LÃ¶schen
-					$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_PAGES."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
-					$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_POSITIONS."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
-					$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_TRANSLATIONS."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
-					$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `id` = '".wpsg_q($st_id)."' ");
-
-				}
-
-				// LÃ€ndernamen
-				$arToTrans = $this->db->fetchAssocField("SELECT CONCAT('land_', `id`) AS `key`, `name` FROM `".WPSG_TBL_LAND."` ", "key", "name");
-
-				// Versandzonen
-				$arToTrans += $this->db->fetchAssocField("SELECT CONCAT('vz_', `id`) AS `key`, `name` FROM `".WPSG_TBL_VZ."` ", "key", "name");
-
-				// Auswahl der Anrede
-				$wpsg_admin_pflicht = $this->shop->get_option('wpsg_admin_pflicht');
-				$arToTrans['anrede_auswahl'] = $wpsg_admin_pflicht['anrede_auswahl'];
-
-				// Text Widerrufsmail
-				$arToTrans['wpsg_ps_mailwiderruf'] = $this->shop->get_option('wpsg_ps_mailwiderruf');
-
-				// Module
-				// TODO
-
-				foreach ($arToTrans as $k => $t)
-				{
-
-				    // DoppeleintrÃ€ge verhindern
-                    $exist = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `value` = '".wpsg_q($t)."' AND `context` = 'wpsg' ");
-
-                    if (!wpsg_isSizedInt($exist))
-                    {
-
-                        icl_register_string('wpsg', 'wpsg_auto_'.$k, $t, false, $this->get_option('wpsg_backend_language'));
-
-                    }
-
-				}
-
-				$this->addBackendMessage(wpsg_translate(__('#1# Texte zur String-Ãbersetzung der Domain "wpsg" hinzugefÃŒgt.'), sizeof($arToTrans)));
-
-				$this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=wpml');
-
+		public function wpmlAction() {
+
+			if (isset($_REQUEST['wpsg_set_string_translation'])) {
+
+				if (function_exists('icl_register_string')) {
+					//throw new \wpsg\Exception(__('WPML ist nicht komplett Installiert (Funktion icl_register_string ist nicht erreichbar)', 'wpsg'));
+
+					// Alle Automatisch angelegten String-Ãbersetzungen lÃ¶schen
+					$arStringTrans = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `context` = 'wpsg' AND `name` LIKE 'wpsg_auto_%' ");
+
+					foreach ($arStringTrans as $st_id) {
+
+						// LÃ¶schen
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_PAGES."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_POSITIONS."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_TRANSLATIONS."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `id` = '".wpsg_q($st_id)."' ");
+
+					}
+
+					// LÃ€ndernamen
+					$arToTrans = $this->db->fetchAssocField("SELECT CONCAT('land_', `id`) AS `key`, `name` FROM `".WPSG_TBL_LAND."` ", "key", "name");
+
+					// Versandzonen
+					$arToTrans += $this->db->fetchAssocField("SELECT CONCAT('vz_', `id`) AS `key`, `name` FROM `".WPSG_TBL_VZ."` ", "key", "name");
+
+					// Auswahl der Anrede
+					$wpsg_admin_pflicht = $this->shop->get_option('wpsg_admin_pflicht');
+					$arToTrans['anrede_auswahl'] = $wpsg_admin_pflicht['anrede_auswahl'];
+
+					// Text Widerrufsmail
+					$arToTrans['wpsg_ps_mailwiderruf'] = $this->shop->get_option('wpsg_ps_mailwiderruf');
+
+					foreach ($arToTrans as $k => $t) {
+
+						// DoppeleintrÃ€ge verhindern
+						$exist = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `value` = '".wpsg_q($t)."' AND `context` = 'wpsg' ");
+
+						if (!wpsg_isSizedInt($exist)) {
+
+							icl_register_string('wpsg', 'wpsg_auto_'.$k, $t, false, $this->get_option('wpsg_backend_language'));
+
+						}
+
+					}
+
+					$this->addBackendMessage(wpsg_translate(__('#1# Texte zur String-Ãbersetzung der Domain "wpsg" hinzugefÃŒgt.'), sizeof($arToTrans)));
+
+					$this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=wpml');
+
+				} else {
+
+					//throw new \wpsg\Exception(__('test', 'wpsg'));
+
+					// Alle Automatisch angelegten String-Ãbersetzungen lÃ¶schen
+					$arStringTrans = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `context` = 'wpsg' AND `name` LIKE 'wpsg_auto_%' ");
+
+					foreach ($arStringTrans as $st_id) {
+
+						// LÃ¶schen
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_PAGES."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_POSITIONS."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRING_TRANSLATIONS."` WHERE `string_id` = '".wpsg_q($st_id)."' ");
+						$this->db->Query("DELETE FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `id` = '".wpsg_q($st_id)."' ");
+
+					}
+
+					// LÃ€ndernamen
+					$arToTrans = $this->db->fetchAssocField("SELECT CONCAT('land_', `id`) AS `key`, `name` FROM `".WPSG_TBL_LAND."` ", "key", "name");
+
+					// Versandzonen
+					$arToTrans += $this->db->fetchAssocField("SELECT CONCAT('vz_', `id`) AS `key`, `name` FROM `".WPSG_TBL_VZ."` ", "key", "name");
+
+					// Auswahl der Anrede
+					$wpsg_admin_pflicht = $this->shop->get_option('wpsg_admin_pflicht');
+					$arToTrans['anrede_auswahl'] = $wpsg_admin_pflicht['anrede_auswahl'];
+
+					// Text Widerrufsmail
+					$arToTrans['wpsg_ps_mailwiderruf'] = $this->shop->get_option('wpsg_ps_mailwiderruf');
+
+					foreach ($arToTrans as $k => $t) {
+
+						// DoppeleintrÃ€ge verhindern
+						$exist = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_WPML_ICL_STRINGS."` WHERE `value` = '".wpsg_q($t)."' AND `context` = 'wpsg' ");
+
+						if (!wpsg_isSizedInt($exist)) {
+
+							do_action('wpml_register_single_string', 'wpsg', 'wpsg_auto_'.$k, $t, false, $this->get_option('wpsg_backend_language'));
+
+						}
+
+					}
+
+					$this->addBackendMessage(wpsg_translate(__('#1# Texte zur String-Ãbersetzung der Domain "wpsg" hinzugefÃŒgt.'), sizeof($arToTrans)));
+
+					$this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=wpml');
+
+				} 
 			}
 
