Xanderॐ Posted January 6, 2011 Share Posted January 6, 2011 Introduction: L2JTranslator is an addon for L2JServer freya version that allows an admin or player to speak any language he wants via googles translation services. It helps admins communicate with other nationality players who cannot ( or will not ... >:( ) speak english. Apart from the translator the addon comes with an IP locator that allows you to find out what kind of language a player speaks. Features: IPLocator - Allows you to find the nationality ( and language ) of a given player. L2JTranslator - Allows you to get in an auto-translated session with another player. One to One communication - You can autotranslate for 1 player only not for announcements. You can select which languages should be available. You can select if players can enable a translation service. Usage: Target a player and type .locate --> Tells you his country based on a lookup on his IP. Target a player and type .translate <language> --> Starts a translation session. .translate without arguments --> tells you the available languages. .endTranslation --> ends a translation with a player. Use it always when you finish talking with that player. Installation: You will need to add the following three jar files in your project and on your build. To add them on your project place them on the /lib folder and add them to the classpath ( project --> properties --> build path --> add jar ). To add them on your build path open build.xml and place the right lines in there. I have an example in the code that follows. Java IP Locator: http://sourceforge.net/projects/javainetlocator/ Google Translate API: http://code.google.com/p/google-api-translate-java/downloads/detail?name=google-api-translate-java-0.94.jar http://mirrors.ibiblio.org/pub/mirrors/maven2/org/json/json/20090211/json-20090211.jar (You need that too ). Core: http://pastebin.com/pT9G7Zjb Datapack: http://pastebin.com/c2G6zVpC User notes: Song used while coding it: Since this system communicates with google translate engine, i wouldnt recommend enabling it for player - to - player communication. Or at least not for all players. Quote Link to comment Share on other sites More sharing options...
Setekh Posted January 6, 2011 Share Posted January 6, 2011 you can do it more resourceful then that >.> Quote Link to comment Share on other sites More sharing options...
Xanderॐ Posted January 6, 2011 Author Share Posted January 6, 2011 What do you mean ? Quote Link to comment Share on other sites More sharing options...
vagos123 Posted January 6, 2011 Share Posted January 6, 2011 i think u MUST share the translator as well !!! perfect share ! Quote Link to comment Share on other sites More sharing options...
Xanderॐ Posted January 6, 2011 Author Share Posted January 6, 2011 I think you must give feedback and bug reports before i start coding the translator. Lets start with simple steps, quest numero uno : add a new jar in your build :) Quote Link to comment Share on other sites More sharing options...
Spidey* Posted January 6, 2011 Share Posted January 6, 2011 It's a great code .. I will try it! Great Job Leluche Quote Link to comment Share on other sites More sharing options...
+cs.tribal Posted January 6, 2011 Share Posted January 6, 2011 omg... reallly cool!... i mean... awesome! It's gonna help many server! btw... will the player be able to enable/disable in-game? Quote Link to comment Share on other sites More sharing options...
mfausb Posted January 6, 2011 Share Posted January 6, 2011 The result for me is: "Player is from: **"..?! Quote Link to comment Share on other sites More sharing options...
DnR Posted January 6, 2011 Share Posted January 6, 2011 btw... will the player be able to enable/disable in-game? If players are unable to enable/disable it,it's just a useless code made to impress ppl. It's not like all people in the world can speak english,some players have to use their own language in order to be in contact. Quote Link to comment Share on other sites More sharing options...
mfausb Posted January 6, 2011 Share Posted January 6, 2011 If players are unable to enable/disable it,it's just a useless code made to impress ppl. It's not like all people in the world can speak english,some players have to use their own language in order to be in contact. Huh? Arent you able to customize it or what? Maybe you are the only thing here thats useless. Quote Link to comment Share on other sites More sharing options...
Xanderॐ Posted January 6, 2011 Author Share Posted January 6, 2011 ill check it myself about the result. Maybe the inet argument isnt right. Quote Link to comment Share on other sites More sharing options...
Xanderॐ Posted January 6, 2011 Author Share Posted January 6, 2011 EDIT: It doenst return location because you are running from the same computer and the routing assigns you 127.0.0.1. If you run your client from another network than that of the server it will give you the location. Quote Link to comment Share on other sites More sharing options...
mfausb Posted January 6, 2011 Share Posted January 6, 2011 EDIT: It doenst return location because you are running from the same computer and the routing assigns you 127.0.0.1. If you run your client from another network than that of the server it will give you the location. And how do you know I did it this way?^^ Quote Link to comment Share on other sites More sharing options...
Xanderॐ Posted January 6, 2011 Author Share Posted January 6, 2011 I tested all the other alternatives and it worked. So you probably tested it on your home pc server while client was from same network too ( lan ). Quote Link to comment Share on other sites More sharing options...
Xanderॐ Posted January 6, 2011 Author Share Posted January 6, 2011 Bump part 2 is in, translator system. Very alpha version its time for testing. First locate the player language with .locate then use the .translate and stopTranslation commands. EDIT: First post updated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.