home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 June / PCWorld_2004-06_cd.bin / software / vyzkuste / problemy / problemy.exe / M2Combo.exe / Plugin / lan.js < prev    next >
Text File  |  2003-12-18  |  6KB  |  135 lines

  1. /**********************************************************************
  2. *=======================================================================
  3. * This script is design for MyIE2 sidebar plugin
  4. * Requirements:
  5. *   Windows Media Player 9 Series or later;
  6. *   IE 6.0;
  7. *   MyIE2 0.8 Version or later.
  8. * Author:
  9. *   Ptma (or AKing)
  10. *   Mailto:ptma@163.net
  11. *=======================================================================
  12. * ┤╦╜┼▒╛╙├╙┌MyIE2▓α▒▀└╕▓σ╝■
  13. * ╧╡═│╨Φ╟≤ú║
  14. *   Windows Media Player 9 Series ╗≥╕ⁿ╨┬╡─░µ▒╛ú╗
  15. *   IE 6.0ú╗
  16. *   MyIE2 0.8 ╗≥╕ⁿ╨┬╡─░µ▒╛íú
  17. * ╫≈╒▀╨┼╧óú║
  18. *   Ptma  (╙╓ú║AKing)
  19. *   ╡τ╫╙╙╩╝■:ptma@163.net
  20. *=======================================================================
  21. **********************************************************************/
  22. var language;
  23.  
  24. language=window.external.m2_readIni('WMP Player','config.ini','General','language','');
  25.  
  26. function findLngFiles()      //┤╙language─┐┬╝╝╙╘╪╙∩╤╘╬─╝■╡╜╧┬└¡▓╦╡Ñ
  27. {  
  28.    var f1,fc,s;
  29.    //fso = new ActiveXObject("Scripting.FileSystemObject");
  30.    fo = fso.GetFolder('plugin\\WMP\\language');
  31.    fc = new Enumerator(fo.files);     
  32.    for (; !fc.atEnd(); fc.moveNext())
  33.       if ((fc.item().name.substr(fc.item().name.lastIndexOf('.')))=='.ini')
  34.       { s=window.external.m2_readIni('WMP Player','language/'+fc.item().name,'General','lngName','');
  35.        if (s.length>0)
  36.         lngOption.options[lngOption.options.length] = new Option(s,fc.item().name);
  37.       }
  38. }
  39.  
  40. function setLng(v)           //╔Φ╓├╙∩╤╘
  41. {
  42.  window.external.m2_writeIni('WMP Player','config.ini','General','language',v);
  43.  language=v;
  44. }
  45. function lngStr(section,item) //┤╙╡▒╟░╡─╙∩╤╘╬─╝■╓╨╚í╓╞╢¿╨í╜┌╡─╓╡
  46. {
  47.   var s=window.external.m2_readIni('WMP Player','language/'+language,section,item,'');
  48.   if (s.length<=0)
  49.       s=window.external.m2_readIni('WMP Player','language/English.ini',section,item,'');  //╚τ╣√╒╥▓╗╡╜ini╓╨╕├╨í╜┌╡─╓╡ú¼╘≥╖╡╗╪English.ini╓╨╡─╓╡
  50.   return s;
  51. }
  52. function pStats()
  53. {
  54.   var NewState=Player.playState;
  55.   var mytext='';
  56.   switch (NewState)
  57.   {
  58.     case 1:{mytext = ' '+lngStr("State","Stoped");break;}
  59.     case 2:{mytext = ' '+lngStr("State","Paused");break;}
  60.     case 3:{mytext = ' '+lngStr("State","Playing");break;}
  61.     case 6:{mytext = ' '+lngStr("State","Buffering")+'...';break;}
  62.     case 7:{mytext = ' '+lngStr("State","Waiting");break;} 
  63.     case 9:{mytext = ' '+lngStr("State","Transitioning...");break;}  
  64.     case 10:{mytext = ' '+lngStr("State","Ready");break;}
  65.     default:mytext = "";
  66.   }
  67.   disp1.innerHTML=mytext;
  68.   mdisp1.innerHTML=mytext;
  69. }
  70. function applyLng()          //╙ª╙├╙∩╤╘╬─╝■
  71.           //lngOption.value=language; //╤í╓╨╡▒╟░╙∩╤╘
  72.  
  73.           controlpanel.innerHTML=lngStr("Control","Control Panel");
  74.           CortrolUp.alt=lngStr("Control","Hide Control Panel");
  75.           CortrolDown.alt=lngStr("Control","Show Control Panel");
  76.           vol.alt=lngStr("Control","Volume")+': '+VolumePos+'%';
  77.           bal.alt=lngStr("Control","Balance")+': '+balancePos;
  78.           sound.alt=lngStr("Control","Mute");          
  79.           seek.alt=lngStr("Control","Postion");
  80.           fulls.alt=lngStr("Control","Full screen");
  81.           sinfo.alt=lngStr("Control","Show current media informations");
  82.           loop.alt=lngStr("Control","loop");
  83.           shuff.alt=lngStr("Control","shuff");
  84.           MediaLib.alt=lngStr("MediaLibrary","Media Library");
  85.           WMPOption.alt=lngStr("Control","WMP Options")+' ...';
  86.           play.alt=lngStr("Control","Play");
  87.           stop.alt=lngStr("Control","Stop");
  88.           pause.alt=lngStr("Control","Pause");
  89.           prev.alt=lngStr("Control","Previous");
  90.           next.alt=lngStr("Control","Next");
  91.           of.alt=lngStr("Control","Open files...");
  92.           af.alt=lngStr("Control","Add files...");
  93.           adf.alt=lngStr("Control","Add Folder...");
  94.           ou.alt=lngStr("Control","Open URL...");
  95.  
  96.           micmute.alt=lngStr("Control","Mute");
  97.           micinfo.alt=lngStr("Control","Show current media informations");
  98.           micloop.alt=lngStr("Control","loop");
  99.           micshuff.alt=lngStr("Control","shuff");
  100.           miclib.alt=lngStr("MediaLibrary","Media Library");
  101.           micoption.alt=lngStr("Control","WMP Options")+' ...';
  102.           micplay.alt=lngStr("Control","Play");
  103.           micstop.alt=lngStr("Control","Stop");
  104.           micpause.alt=lngStr("Control","Pause");
  105.           micprev.alt=lngStr("Control","Previous");
  106.           micnext.alt=lngStr("Control","Next");
  107.           micopen.alt=lngStr("Control","Open files...");
  108.           micadd.alt=lngStr("Control","Add files...");
  109.           micdir.alt=lngStr("Control","Add Folder...");
  110.           micurl.alt=lngStr("Control","Open URL...");
  111.           imgmic.alt=lngStr("Control","Micro-view");
  112.           imgnormal.alt=lngStr("Control","Normal view");
  113.           
  114.           screenpanel.innerHTML=lngStr("Screen","Screen Panel");
  115.           ScreenUp.alt=lngStr("Screen","Hide Screen Panel");
  116.           ScreenDown.alt=lngStr("Screen","Show Screen Panel");
  117.  
  118.           lyricpanel.innerHTML=lngStr("Lyric","Lyric Panel");
  119.           SmiUp.alt=lngStr("Lyric","Hide Lyric Panel");
  120.           SmiDown.alt=lngStr("Lyric","Show Lyric Panel");
  121.           capText1.innerHTML=lngStr("Lyric","Show Lyric Here(Lrc)");
  122.  
  123.           PLpanel.innerHTML=lngStr("Playlist","Playlist Panel");
  124.           PLUp.alt=lngStr("Playlist","Hide Playlist Panel");
  125.           PLDown.alt=lngStr("Playlist","Show Playlist Panel");
  126.           imgReload.title=lngStr("Playlist","Reload Playlist");
  127.           imgMoveup.title=lngStr("Playlist","Move up");
  128.           imgMovedown.title=lngStr("Playlist","Move down");
  129.           imgDelete.title=lngStr("Playlist","Delete Selected Item");
  130.           imgDeleteAll.title=lngStr("Playlist","DeleteAll");
  131.           imgItemInfo.title=lngStr("Playlist","Show Informations of Selected Item");
  132.           imgAssociate.title=lngStr("Other","Associate Lyric");
  133.           pStats();
  134. }