Index: wysiwyg.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/wysiwyg.admin.inc,v
retrieving revision 1.15.2.2
diff -u -p -r1.15.2.2 wysiwyg.admin.inc
--- wysiwyg.admin.inc	18 Jul 2009 18:47:48 -0000	1.15.2.2
+++ wysiwyg.admin.inc	16 Aug 2009 17:29:16 -0000
@@ -91,13 +91,20 @@ function wysiwyg_profile_form($form_stat
     '#value' => $profile->settings['theme'],
   );
 
-  $form['basic']['language'] = array(
-    '#type' => 'select',
-    '#title' => t('Language'),
-    '#default_value' => $profile->settings['language'],
-    '#options' => drupal_map_assoc(array('ar', 'ca', 'cs', 'cy', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'fr_ca', 'he', 'hu', 'is', 'it', 'ja', 'ko', 'nb', 'nl', 'nn', 'pl', 'pt', 'pt_br', 'ru', 'ru_KOI8-R', 'ru_UTF-8', 'si', 'sk', 'sv', 'th', 'zh_cn', 'zh_tw', 'zh_tw_utf8')),
-    '#description' => t('The language to use for the editor interface. Language codes are based on the <a href="http://www.loc.gov/standards/iso639-2/englangn.html">ISO-639-2</a> format.'),
-  );
+  // Load plugins information for the given editor.
+  $plugins = wysiwyg_get_plugins($profile->editor);
+
+  if (isset($plugins['default']['languages']) && is_array($plugins['default']['languages'])) {
+    $form['basic']['language'] = array(
+      '#type' => 'select',
+      '#title' => t('Language'),
+      '#default_value' => $profile->settings['language'],
+      '#options' => drupal_map_assoc($plugins['default']['languages']),
+    );
+    if (isset($plugins['default']['languages_help'])) {
+      $form['basic']['language']['#description'] = $plugins['default']['languages_help'];
+    }
+  }
 
   $form['buttons'] = array(
     '#type' => 'fieldset',
@@ -108,7 +115,6 @@ function wysiwyg_profile_form($form_stat
     '#theme' => 'wysiwyg_admin_button_table',
   );
 
-  $plugins = wysiwyg_get_plugins($profile->editor);
   // Generate the button list.
   foreach ($plugins as $name => $meta) {
     if (isset($meta['buttons']) && is_array($meta['buttons'])) {
Index: editors/fckeditor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/fckeditor.inc,v
retrieving revision 1.17.2.1
diff -u -p -r1.17.2.1 fckeditor.inc
--- editors/fckeditor.inc	22 Jun 2009 03:00:15 -0000	1.17.2.1
+++ editors/fckeditor.inc	16 Aug 2009 17:19:40 -0000
@@ -208,8 +208,19 @@ function wysiwyg_fckeditor_proxy_plugin_
  * Return internal plugins for this editor; semi-implementation of hook_wysiwyg_plugin().
  */
 function wysiwyg_fckeditor_plugins($editor) {
+  $languages = array();
+  if ($handle = opendir($editor['library path'] .'/editor/lang')) {
+    while (FALSE !== ($file = readdir($handle))) {
+      if (preg_match('`^([-_a-zA-Z0-9]+)\.js$`', $file, $matches)) {
+        $languages[] = $matches[1];
+      }
+    }
+    closedir($handle);
+  }
   $plugins = array(
     'default' => array(
+      'languages' => $languages,
+      'languages_help' => t('Languages available for this version of FCKeditor.'),
       'buttons' => array(
         'Bold' => t('Bold'), 'Italic' => t('Italic'), 'Underline' => t('Underline'),
         'StrikeThrough' => t('Strike-through'),
Index: editors/tinymce.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/tinymce.inc,v
retrieving revision 1.35.2.1
diff -u -p -r1.35.2.1 tinymce.inc
--- editors/tinymce.inc	3 Aug 2009 22:37:15 -0000	1.35.2.1
+++ editors/tinymce.inc	16 Aug 2009 17:14:38 -0000
@@ -370,9 +370,20 @@ function _wysiwyg_tinymce_plugin_name($o
  * Return internal plugins for this editor; semi-implementation of hook_wysiwyg_plugin().
  */
 function wysiwyg_tinymce_plugins($editor) {
+  $languages = array();
+  if ($handle = opendir($editor['library path'] .'/langs')) {
+    while (FALSE !== ($file = readdir($handle))) {
+      if (preg_match('`^([-_a-zA-Z0-9]+)\.js$`', $file, $matches)) {
+        $languages[] = $matches[1];
+      }
+    }
+    closedir($handle);
+  }
   $plugins = array(
     'default' => array(
       'path' => $editor['library path'] . '/themes/advanced',
+      'languages' => $languages,
+      'languages_help' => t('More languages available from <a href="@download">TinyMCE official site</a>.', array('@download' => 'http://tinymce.moxiecode.com/download_i18n.php')),
       'buttons' => array(
         'bold' => t('Bold'), 'italic' => t('Italic'), 'underline' => t('Underline'),
         'strikethrough' => t('Strike-through'),
