選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

settingsGlobalLanguage.html 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!--
  2. Language Settings
  3. Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
  4. $Id: settingsGlobalLanguage.html 595 2015-04-17 09:50:36Z imoore76 $
  5. -->
  6. <table style='width: auto; margin-left:auto; margin-right:auto;' class='vboxInvisible'>
  7. <tr>
  8. <td style='text-align: left'><span class='translate'>Interface Language:</span></td>
  9. </tr>
  10. <tr>
  11. <td>
  12. <div style='width: 100%; height: 100%;'>
  13. <ul id='vboxLanguageList' class='vboxBordered vboxList vboxHover'>
  14. <li class='vboxListItem'>Default</li>
  15. </ul>
  16. <div id='vboxLanguageName' style='text-align: center; padding: 4px;'></div>
  17. </div>
  18. </td>
  19. </tr>
  20. </table>
  21. <script type='text/javascript'>
  22. /* Fill Languages */
  23. var vboxLanguages = [
  24. {'id':'en','name':'English'},
  25. {'id':'pt_br','name':'Portuguese (Brazil)','name_tr':'Português (Brasil)'},
  26. {'id':'ru','name':'Russian','name_tr':'Русский'},
  27. {'id':'it','name':'Italian','name_tr':'Italiano'},
  28. {'id':'fr','name':'French','name_tr':'Français'},
  29. {'id':'de','name':'German','name_tr':'Deutsch'},
  30. {'id':'es','name':'Spanish','name_tr':'Español'},
  31. {'id':'ja','name':'Japanese','name_tr':'日本語'},
  32. {'id':'pl','name':'Polish','name_tr':'Polski'},
  33. {'id':'zh_cn','name':'Chinese (China)','name_tr':'简体中文 (中国)'},
  34. {'id':'zh_tw','name':'Traditional Chinese','name_tr':'正體中文'},
  35. {'id':'ro','name':'Romanian','name_tr':'Română'},
  36. {'id':'nl','name':'Dutch','name_tr':'Nederlands (Nederland)'},
  37. {'id':'cs','name':'Czech','name_tr':'čeština'},
  38. ];
  39. var lList = $('#vboxLanguageList');
  40. $(lList).children().remove();
  41. var defLang = __vboxLangName;
  42. if (!defLang) defLang = 'en';
  43. for(var i = 0; i < vboxLanguages.length; i++) {
  44. var li = $('<li />').data({'language':vboxLanguages[i]}).html((vboxLanguages[i].name_tr ? vboxLanguages[i].name_tr : vboxLanguages[i].name)).attr('class','vboxListItem').hoverClass("vboxHover");
  45. if(defLang == vboxLanguages[i].id) {
  46. $(li).addClass('vboxListItemSelected');
  47. $('#vboxLanguageName').html(vboxLanguages[i].name + (vboxLanguages[i].name_tr ? (' / ' + vboxLanguages[i].name_tr) : ''));
  48. }
  49. $(li).click(function(){
  50. $(this).addClass('vboxListItemSelected').siblings().removeClass('vboxListItemSelected');
  51. $('#vboxLanguageName').html($(this).data('language').name + ($(this).data('language').name_tr ? (' / ' + $(this).data('language').name_tr) : ''));
  52. });
  53. $(lList).append(li);
  54. }
  55. /*
  56. *
  57. * Update Data onSave()
  58. *
  59. */
  60. $('#vboxSettingsDialog').on('save',function(){
  61. var lang = $('#vboxLanguageList').children('li.vboxListItemSelected').first().data('language');
  62. if(!lang) return;
  63. $('#vboxSettingsDialog').data('language', lang.id);
  64. });
  65. </script>