Index: /trunk/admin/themes/default/template/include/datepicker.inc.tpl
===================================================================
--- /trunk/admin/themes/default/template/include/datepicker.inc.tpl	(revision 28916)
+++ /trunk/admin/themes/default/template/include/datepicker.inc.tpl	(revision 28917)
@@ -3,14 +3,14 @@
 
 {$require='jquery.ui.timepicker-addon'}
-{assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.code`.js"}
+{assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.jquery_code`.js"}
 {if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
-{combine_script id="jquery.ui.datepicker-`$lang_info.code`" load=$load_mode require='jquery.ui.datepicker' path=$datepicker_language}
-{$require=$require|cat:",jquery.ui.datepicker-`$lang_info.code`"}
+{combine_script id="jquery.ui.datepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.datepicker' path=$datepicker_language}
+{$require=$require|cat:",jquery.ui.datepicker-`$lang_info.jquery_code`"}
 {/if}
 
-{assign var="timepicker_language" value="themes/default/js/ui/i18n/jquery.ui.timepicker-`$lang_info.code`.js"}
+{assign var="timepicker_language" value="themes/default/js/ui/i18n/jquery.ui.timepicker-`$lang_info.jquery_code`.js"}
 {if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
-{combine_script id="jquery.ui.timepicker-`$lang_info.code`" load=$load_mode require='jquery.ui.timepicker-addon' path=$timepicker_language}
-{$require=$require|cat:",jquery.ui.timepicker-`$lang_info.code`"}
+{combine_script id="jquery.ui.timepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.timepicker-addon' path=$timepicker_language}
+{$require=$require|cat:",jquery.ui.timepicker-`$lang_info.jquery_code`"}
 {/if}
 
Index: /trunk/admin/themes/default/template/photos_add_direct.tpl
===================================================================
--- /trunk/admin/themes/default/template/photos_add_direct.tpl	(revision 28916)
+++ /trunk/admin/themes/default/template/photos_add_direct.tpl	(revision 28917)
@@ -7,4 +7,9 @@
 {combine_css path="themes/default/js/plugins/jquery.jgrowl.css"}
 {combine_css path="themes/default/js/plugins/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css"}
+
+{assign var="plupload_i18n" value="themes/default/js/plugins/plupload/i18n/`$lang_info.plupload_code`.js"}
+{if "PHPWG_ROOT_PATH"|@constant|@cat:$plupload_i18n|@file_exists}
+  {combine_script id="plupload_i18n-`$lang_info.plupload_code`" load="footer" path=$plupload_i18n require="jquery.plupload.queue"}
+{/if}
 
 {include file='include/colorbox.inc.tpl'}
Index: /trunk/include/template.class.php
===================================================================
--- /trunk/include/template.class.php	(revision 28916)
+++ /trunk/include/template.class.php	(revision 28917)
@@ -150,4 +150,14 @@
       $this->set_template_dir($root);
 
+    if (isset($lang_info['code']) and !isset($lang_info['jquery_code']))
+    {
+      $lang_info['jquery_code'] = $lang_info['code'];
+    }
+
+    if (isset($lang_info['jquery_code']) and !isset($lang_info['plupload_code']))
+    {
+      $lang_info['plupload_code'] = str_replace('-', '_', $lang_info['jquery_code']);
+    }
+    
     $this->smarty->assign('lang_info', $lang_info);
 
Index: /trunk/language/ko_KR/common.lang.php
===================================================================
--- /trunk/language/ko_KR/common.lang.php	(revision 28916)
+++ /trunk/language/ko_KR/common.lang.php	(revision 28917)
@@ -33,4 +33,5 @@
 $lang_info['direction'] = "ltr";
 $lang_info['code'] = "en";
+$lang_info['jquery_code'] = "ko";
 $lang_info['zero_plural'] = true;
 
Index: /trunk/language/pt_BR/common.lang.php
===================================================================
--- /trunk/language/pt_BR/common.lang.php	(revision 28916)
+++ /trunk/language/pt_BR/common.lang.php	(revision 28917)
@@ -34,4 +34,5 @@
 $lang_info['direction'] = 'ltr';
 $lang_info['code'] = 'pt';
+$lang_info['jquery_code'] = 'pt-BR';
 $lang_info['zero_plural'] = false;
 
Index: /trunk/language/sh_RS/common.lang.php
===================================================================
--- /trunk/language/sh_RS/common.lang.php	(revision 28916)
+++ /trunk/language/sh_RS/common.lang.php	(revision 28917)
@@ -34,4 +34,6 @@
 $lang_info['direction'] = 'ltr';
 $lang_info['code'] = 'sh';
+$lang_info['jquery_code'] = 'sr-SR';
+$lang_info['plupload_code'] = 'sr';
 $lang_info['zero_plural'] = true;
 
Index: /trunk/language/sr_RS/common.lang.php
===================================================================
--- /trunk/language/sr_RS/common.lang.php	(revision 28916)
+++ /trunk/language/sr_RS/common.lang.php	(revision 28917)
@@ -34,4 +34,5 @@
 $lang_info['direction'] = 'ltr';
 $lang_info['code'] = 'sr';
+$lang_info['plupload_code'] = 'sr_RS';
 $lang_info['zero_plural'] = true;
 
Index: /trunk/language/th_TH/common.lang.php
===================================================================
--- /trunk/language/th_TH/common.lang.php	(revision 28916)
+++ /trunk/language/th_TH/common.lang.php	(revision 28917)
@@ -33,4 +33,5 @@
 $lang_info['direction'] = "ltr";
 $lang_info['code'] = "th";
+$lang_info['plupload_code'] = "th_TH";
 $lang_info['zero_plural'] = "1";
 
Index: /trunk/language/uk_UA/common.lang.php
===================================================================
--- /trunk/language/uk_UA/common.lang.php	(revision 28916)
+++ /trunk/language/uk_UA/common.lang.php	(revision 28917)
@@ -34,4 +34,6 @@
 $lang_info['direction'] = "ltr";
 $lang_info['code'] = "ua";
+$lang_info['jquery_code'] = "uk";
+$lang_info['plupload_code'] = "uk_UA";
 $lang_info['zero_plural'] = true;
 
Index: /trunk/language/zh_CN/common.lang.php
===================================================================
--- /trunk/language/zh_CN/common.lang.php	(revision 28916)
+++ /trunk/language/zh_CN/common.lang.php	(revision 28917)
@@ -34,4 +34,5 @@
 $lang_info['direction'] = "ltr";
 $lang_info['code'] = "cn";
+$lang_info['jquery_code'] = "zh-CN";
 $lang_info['zero_plural'] = true;
 
Index: /trunk/language/zh_TW/common.lang.php
===================================================================
--- /trunk/language/zh_TW/common.lang.php	(revision 28916)
+++ /trunk/language/zh_TW/common.lang.php	(revision 28917)
@@ -34,4 +34,5 @@
 $lang_info['direction'] = 'ltr';
 $lang_info['code'] = 'cn';
+$lang_info['jquery_code'] = 'zh-TW';
 $lang_info['zero_plural'] = false;
 
