languagefix

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • languagefix

      you all know it, u build in new stuff and think, yeah, for the language i care later, after some time you have changed and added things here and there, and you loose the overview. now you have a game, wich is not translated very propper, and also the given languages let the game crash.
      here comes this little script to help you. it is not really for dayly use, but you dont need it often.
      it loads the files of 2 different languages and searches for the differences in the $LNG arrays
      it then generates an output wich can be copied to the custom.php languagefile.
      like this you fill the missing language-arrayparts, its not in right language, but it is there and the game dont crashes. also it collects all missing, and you can edit it central without searching.
      you have to do the script for ervery language, cause every language is missing other parts
      the script will point you to errors within the languagefilse. just follow the errormessage to the languagefile, there you will find some errors like '.=' instead of '=' oder $$LNG instead of $LNG
      correct the languagefiles and go ahead(with languagefiles i mean the files in folder 'lanuage/')
      finaly how to use. put the file to includes/pages/game/ and run in the browser yourdomain.ldt/game.php?page=LNG&one=de&language=fr

      yourdomain.ldt/game.php?page=LNG&one=de&language=fr < shows you, wich arraykeys (de -> fr) de has, and fr is missing
      yourdomain.ldt/game.php?page=LNG&one=fr&language=de < shows you, wich arraykeys (fr -> de) fr has, and de is missing

      these are to different results
      Example output:

      Source Code

      1. $LNG['ma_modes']['Mail'] = 'Mail';
      2. $LNG['ma_modes']['Game&Mail'] = 'Game&Mail';
      3. $LNG['tech']['221'] = 'Thor';
      4. $LNG['tech']['222'] = 'Thriller';
      5. $LNG['tech']['223'] = 'Behamut';
      6. $LNG['tech']['224'] = 'Wiper';
      7. $LNG['tech']['225'] = 'Ifrit';
      8. $LNG['tech']['226'] = 'Shiva';
      9. $LNG['tech']['227'] = 'Destiny';
      10. $LNG['tech']['228'] = 'Viking';
      11. $LNG['tech']['229'] = 'Odin';
      12. $LNG['tech']['412'] = 'Nukleer Fuze Atesleyici';
      13. $LNG['tech']['413'] = 'Optik Fuze Atesleyici';
      14. $LNG['shortDescription']['221'] = 'Kara savascinin evrene hakim olmasindan sonra bilim adamlari onu durduracar bir gemi uretmeye calistirlar. Bunun sonucunda ortaya Thor cikti. ';
      15. $LNG['shortDescription']['222'] = 'Evrenin yeni kabusu olmaya aday bu gemi oxion klani tarafindan gelistirildi fakat diger irklarin da ustun casusluk seviyeleri sayesinde su an her irk bu gemiyi uretebiliyor. Ayni anda hem yuksek saldiri hem de savunma gucu tasiyor';
      16. $LNG['shortDescription']['223'] = 'Avatarin evrene gelmesinden sonra saldiridan uzak yasayan irklar tarafindan gelistirilen bu gemi kesinlikle evrenin en buyuk savunma silahi haline getirdiler';
      17. $LNG['shortDescription']['224'] = 'Defans teknolojilerinin hizla gelismesi sonucu muhribi yaratan muhendisler tarafindan savunmasi gelistirilen Wiper yuksek bir savunma gucune sahip.';
      18. $LNG['shortDescription']['225'] = 'Ifrit Savunmalari ayni olsa da Wiper'a gore daha hizli ve daha yuksek saldiri gucune sahiptir.';
      19. $LNG['shortDescription']['226'] = 'Shiva, ifrit ile benzer ozellik tasir, en buyuk farki shivanin daha ucuz maliyetidir';
      20. $LNG['shortDescription']['227'] = 'Destiny, komuta gemisinin gelismis versiyonudur';
      21. $LNG['shortDescription']['228'] = 'Viking yuksek hizi ve saglam savunmasi ile korsanlar tarafindan en cok kullanilan gemidir';
      22. $LNG['shortDescription']['229'] = 'Evrenin kesinlikle en hizli saldiri gemisi olan odin korsanlarin gozbebegidir';
      23. $LNG['shortDescription']['412'] = 'Savunma teknolojilerindeki gelismenin kesinlikle en buyuk meyvesidir. Nukleer teknoloji ile savunma teknolojisinin birlestirilmesiyle olusturulan nukleer atesleyiciler gemilerin en korkulu ruyasidir.';
      24. $LNG['shortDescription']['413'] = 'Uzmanlar, plazma aticilarin olusturdugu yuksek miktardaki optik isigi daha da yogunlastirarak optik fuzelere donusturduler';
      25. $LNG['longDescription']['221'] = 'Kara savascinin evrene hakim olmasindan sonra bilim adamlari onu durduracar bir gemi uretmeye calistirlar. Ozellikle iyon teknolonojisinde cok buyuk ilerleme kaydeden bilimadamlari bunu Thorda birlestirdiler. Kara savascinin silahlarina karsi ayrica ozel savunmalar gelistirildi ve onu vuracak etkili silahlar gelistirildi. Her ne kadar bu gemi kara savasciya karsi cok guclu olsa da, olum yildizinin saldiri gucunun cok altinda. ';
      26. $LNG['longDescription']['222'] = 'Evrenin yeni kabusu olmaya aday bu gemi oxion klani tarafindan gelistirildi fakat diger irklarin da ustun casusluk seviyeleri sayesinde su an her irk bu gemiyi uretebiliyor. Ayni anda hem yuksek saldiri hem de savunma gucu tasiyor';
      27. $LNG['longDescription']['223'] = 'Avatarin evrene gelmesinden sonra saldiridan uzak yasayan irklar tarafindan gelistirilen bu gemi kesinlikle evrenin en buyuk savunma silahi haline getirdiler';
      28. $LNG['longDescription']['224'] = 'Defans teknolojilerinin hizla gelismesi sonucu muhribi yaratan muhendisler tarafindan savunmasi gelistirilen Wiper yuksek bir savunma gucune sahip.';
      29. $LNG['longDescription']['225'] = 'Ifrit Savunmalari ayni olsa da Wiper'a gore daha hizli ve daha yuksek saldiri gucune sahiptir.';
      30. $LNG['longDescription']['226'] = 'Shiva, ifrit ile benzer ozellik tasir, en buyuk farki shivanin daha ucuz maliyetidir';
      31. $LNG['longDescription']['227'] = 'Destiny, komuta gemisinin gelismis versiyonudur. En son teknolojilerle donatilan destini her gezegende olmazsa olmaz bir gemidir. ';
      32. $LNG['longDescription']['228'] = 'Viking yuksek hizi ve saglam savunmasi ile korsanlar tarafindan en cok kullanilan gemidir';
      33. $LNG['longDescription']['229'] = 'Evrenin kesinlikle en hizli saldiri gemisi olan odin korsanlarin gozbebegidir. Bir galaksiden otekine cok hizli bir sekilde yol alip dusmani hic ummadigi bir anda yakalayabilir.';
      34. $LNG['longDescription']['412'] = 'Savunma teknolojilerindeki gelismenin kesinlikle en buyuk meyvesidir. Nukleer teknoloji ile savunma teknolojisinin birlestirilmesiyle olusturulan nukleer atesleyiciler gemilerin en korkulu ruyasidir.';
      35. $LNG['longDescription']['413'] = 'Uzmanlar, plazma aticilarin olusturdugu yuksek miktardaki optik isigi daha da yogunlastirarak optik fuzelere donusturduler';
      36. $LNG['shortNames']['221'] = 'Thor';
      37. $LNG['shortNames']['222'] = 'Thriller';
      38. $LNG['shortNames']['223'] = 'Behamut';
      39. $LNG['shortNames']['224'] = 'Wiper';
      40. $LNG['shortNames']['225'] = 'Ifrit';
      41. $LNG['shortNames']['226'] = 'Shiva';
      42. $LNG['shortNames']['227'] = 'Destiny';
      43. $LNG['shortNames']['228'] = 'Viking';
      44. $LNG['shortNames']['229'] = 'Odin';
      45. $LNG['shortNames']['412'] = 'Nukleer Fuze';
      46. $LNG['shortNames']['413'] = 'Optik Fuze';
      Display All



      'one' should be the language, wich you run your game in
      'language' should be the language you want to make kompatible


      the custom.php wich the output is copied to is allways the one of the 'language' folder
      ps. if you copied to custom, on second try, may some thing is found in tech.php, but can be ignored.
      there are just arrays to a deth 0 and 1 serached, but in most cases this should be enougth.
      it is just a workingtool, and does its job.
      Files
    • other thing people forget is change common to take additional language files ;) like MODONE.php etc...