diff --git a/plugins/amazon_wysiwyg.inc b/plugins/amazon_wysiwyg.inc
index 1693192..4040883 100644
--- a/plugins/amazon_wysiwyg.inc
+++ b/plugins/amazon_wysiwyg.inc
@@ -9,6 +9,40 @@
  * Implements hook_wysiwyg_module_plugin().
  */
 function amazon_wysiwyg_amazon_wysiwyg_plugin() {
+  if (!path_is_admin(current_path())) {
+    return;
+  }
+
+  $form = drupal_get_form('amazon_wysiwyg_form');
+  $markup = drupal_render($form);
+
+  $plugins['amazon_wysiwyg'] = array(
+    'title' => t('Amazon Wysiwyg'),
+    'vendor url' => 'http://drupal.org/project/amazon_wysiwyg',
+    'icon title' => t('Amazon widget'),
+    'css path' => drupal_get_path('module', 'amazon_wysiwyg'),
+    'css file' => 'amazon_wysiwyg.css',
+    'settings' => array(
+      'form_markup' => $markup,
+      'default_locale' => variable_get('amazon_default_locale', 'US'),
+      'icon_markup' => '<img class="amazon-wysiwyg-img" title="Amazon Widget" ' .
+        'src="/' . drupal_get_path('module', 'amazon_wysiwyg') .
+        '/plugins/amazon_wysiwyg/images/amazon_wysiwyg.png' . '" ' .
+        'alt="" title="Amazon Widget" />',
+      'placeholder_markup' => array(
+        'prefix' => '<!--amazon-widget',
+        'suffix' => '-->',
+      ),
+    ),
+  );
+
+  return $plugins;
+}
+
+/*
+ * Implements hook_form().
+ */
+function amazon_wysiwyg_form() {
   $form = array();
 
   // Modify the form.
@@ -22,12 +56,33 @@ function amazon_wysiwyg_amazon_wysiwyg_plugin() {
     '#weight' => 99,
     '#description' => t('Then Amazon ASIN code.'),
   );
+
+  // Populate locale data.
+  $amazon_data = amazon_data_cache();
+  $locales = $amazon_data['locales'];
+  $countries = array();
+  foreach ($locales as $locale => $item) {
+    if (variable_get('amazon_locale_'. $locale .'_associate_id', '')) {
+      $countries[$locale] = $item['name'];
+    }
+  }
+  $form['locale'] = array(
+    '#type' => 'select',
+    '#name' => 'locale',
+    '#title' => 'Country',
+    '#weight' => 98,
+    '#options' => $countries,
+    '#value' => variable_get('amazon_default_locale', 'US'),
+    '#description' => t('Select the country code.'),
+  );
+
   $form['style'] = array(
     '#type' => 'select',
     '#name' => 'style',
     '#title' => 'Style',
     '#weight' => 99,
     '#options' => array(),
+    '#value' => variable_get('amazon_wysiwyg_default_style', 'buy_now_wide'),
     '#description' => t('How to display the widget.'),
   );
   // Populate options from theme registry.
@@ -82,26 +137,5 @@ function amazon_wysiwyg_amazon_wysiwyg_plugin() {
     '#weight' => 130,
   );
 
-  $markup = drupal_render($form);
-
-  $plugins['amazon_wysiwyg'] = array(
-    'title' => t('Amazon Wysiwyg'),
-    'vendor url' => 'http://drupal.org/project/amazon_wysiwyg',
-    'icon title' => t('Amazon widget'),
-    'css path' => drupal_get_path('module', 'amazon_wysiwyg'),
-    'css file' => 'amazon_wysiwyg.css',
-    'settings' => array(
-      'form_markup' => $markup,
-      'icon_markup' => '<img class="amazon-wysiwyg-img" title="Amazon Widget" ' .
-        'src="/' . drupal_get_path('module', 'amazon_wysiwyg') .
-        '/plugins/amazon_wysiwyg/images/amazon_wysiwyg.png' . '" ' .
-        'alt="" title="Amazon Widget" />',
-      'placeholder_markup' => array(
-        'prefix' => '<!--amazon-widget',
-        'suffix' => '-->',
-      ),
-    ),
-  );
-
-  return $plugins;
-}
+  return $form;
+}
\ No newline at end of file
