--- services/widget_services.admin.inc	2011-07-19 12:44:51.000000000 +0200
+++ services/widget_services.admin.inc	2011-07-19 12:37:42.693934000 +0200
@@ -104,7 +104,15 @@
     ),
     '#attributes' => array('class' => 'container-inline'),
   );
- 
+  $form['facebook_like']['service_links_fl_locale'] = array(
+    '#title' => t('Locale'),
+    '#type' => 'textfield',
+    '#default_value' => variable_get('service_links_fl_locale', ''),
+    '#description' => t('Enter the code which represent the wanted language (en, es, fr, it, ...)'),
+    '#size' => '2',
+    '#attributes' => array('class' => 'container-inline'),
+  );
+
   $form['facebook_widget'] = array(
     '#type' => 'fieldset',
     '#collapsible' => TRUE,
--- services/widget_services.module	2011-07-19 12:44:51.000000000 +0200
+++ services/widget_services.module	2011-07-19 12:46:49.924692000 +0200
@@ -35,7 +35,7 @@
   );
   $links['facebook_like'] = array(
     'name' => 'Facebook Like',
-    'link' => 'http://www.facebook.com/plugins/like.php?href=<encoded-url>&layout=<layout>&show_faces=<show_faces>&action=<action>&colorscheme=<colorscheme>&width=<width>&height=<height>&font=<font>',
+    'link' => 'http://www.facebook.com/plugins/like.php?href=<encoded-url>&layout=<layout>&show_faces=<show_faces>&action=<action>&colorscheme=<colorscheme>&width=<width>&height=<height>&font=<font>&locale=<locale>',
     'icon' => 'facebook.png',
     'description' => t('I Like it'),
     'javascript' => 'facebook_like.js',
@@ -81,8 +81,8 @@
     );
 
     $vars['subst'] = array(
-      'count' => variable_get('service_links_tw_data_count', 'horizontal'),
-      'via' => urlencode(variable_get('service_links_tw_data_via' , '')),
+      'count' => check_plain(variable_get('service_links_tw_data_count', 'horizontal')),
+      'via' => check_plain(variable_get('service_links_tw_data_via' , '')),
     );
   }
   
@@ -97,10 +97,13 @@
 
   if (!isset($fs_settings)) {
     $fs_settings = array(
-      'type' => variable_get('service_links_fs_type', 'button_count'),
+      'type' => check_plain(variable_get('service_links_fs_type', 'button_count')),
     );
 
     drupal_add_js(array('ws_fs' => $fs_settings), 'setting');
+    if (variable_get('service_links_fs_fix', FALSE)) {
+      drupal_add_js(service_links_expand_path('facebook_share_fix_count.js', 'javascript'), 'module', 'footer');
+    }
   }
 
   $service['attributes']['rel'] = $subst['url'];
@@ -121,18 +124,24 @@
       'font' => '<font>',
       'width' => '<width>',
       'height' => '<height>',
+      'locale' => '<locale>',
     );
 
     $vars['subst'] = array(
-      'layout' => variable_get('service_links_fl_layout', 'button_count'),
-      'show_faces' => variable_get('service_links_fl_show_faces', 'false'),
-      'action' => variable_get('service_links_fl_action', 'like'),
-      'colorscheme' => variable_get('service_links_fl_colorscheme', 'light'),
-      'font' => variable_get('service_links_fl_font', ''),
-      'width' => variable_get('service_links_fl_width', '100'),
+      'layout' => check_plain(variable_get('service_links_fl_layout', 'button_count')),
+      'show_faces' => check_plain(variable_get('service_links_fl_show_faces', 'false')),
+      'action' => check_plain(variable_get('service_links_fl_action', 'like')),
+      'colorscheme' => check_plain(variable_get('service_links_fl_colorscheme', 'light')),
+      'font' => check_plain(variable_get('service_links_fl_font', '')),
+      'width' => check_plain(variable_get('service_links_fl_width', '100')),
       'height' => '21',
+      'locale' => check_plain(variable_get('service_links_fl_locale', '')),
     );
 
+    if (!empty($vars['subst']['locale'])) {
+      $vars['subst']['locale'] = strtolower($vars['subst']['locale']) . '_' . strtoupper($vars['subst']['locale']);
+    }
+
     $fl_settings = array(
       'width' => $vars['subst']['width'],
       'height' => '21',
@@ -172,8 +181,8 @@
     );
 
     $vars['subst'] = array(
-      'related' => variable_get('service_links_dsb_related', 'yes'),
-      'style' => variable_get('service_links_dsb_style', 'yes'),
+      'related' => check_plain(variable_get('service_links_dsb_related', 'yes')),
+      'style' => check_plain(variable_get('service_links_dsb_style', 'yes')),
     );
   }
 
@@ -189,8 +198,8 @@
 
   if (!isset($gpo_settings)) {
     $gpo_settings = array(
-      'type' => variable_get('service_links_gpo_type', ''),
-      'counter' => variable_get('service_links_gpo_counter', TRUE),
+      'type' => check_plain(variable_get('service_links_gpo_type', '')),
+      'counter' => (boolean) variable_get('service_links_gpo_counter', TRUE),
     );
 
     drupal_add_js(array('ws_gpo' => $gpo_settings), 'setting');
