Jump to content

Recommended Posts

Posted

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.

 

Posted

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.

Posted

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.

Posted

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.

Posted

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?^^

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...