AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Chat Translation (https://forums.alliedmods.net/showthread.php?t=91671)

hlstriker 05-03-2009 22:14

Chat Translation
 
2 Attachment(s)
+description+
This plugin will take other players chat and translate it according to the language the player has set in their amx_langmenu.

Example:
- There are 12 players speaking English (and have English set in amx_langmenu).
- There are 5 players speaking German (and have German set in amx_langmenu).
- There are 2 players speaking Spanish (and have Spanish set in amx_langmenu).
- The players in English will now see the German's/Spanish's chat in English.
- The players in German will now see the English's/Spanish's chat in German.
- The players in Spanish will now see the English's/German's chat in Spanish.

How it works:
- Before sending the chat message to each player it will first send it to Google's Translation page (http://translate.google.com/translate_t).
- It will now retrieve the translated text and send it on to the selected player.
- If the sending and receiveing player are using the same language it won't use the translator.

Limitations:
- Only the languages supported in amx_langmenu are supported in this plugin.
- 2 languages in amx_langmenu are also not available on Google (Macedonian and l33t).
- Google Translations are not perfect. There will be errors sometimes of course.
- The HL1 engine cannot display some translated characters (that char will be left out of word).

+cvars+
sv_langdomain ".com"
- Sets the domain in which to use on Google for the translation.
- You will want to set this to the domain closest to your server (make sure it exists first!).
- Example: United States will use .com (Default), United Kingdom will use .co.uk

sv_langmod "mod"
- Here you must set the mod name abbreviation you are using (Default: cs).
- Names to choose from: CS, TFC.

sv_translatefile "URL"
- This cvar allows you to enter the URL to the ChatTranslation.php file.
- The closer the URL is to your game server the better.
- If you set this cvar it will use the ChatTranslation.php file before/after translating.
- The ChatTranslation.php file is good to use so it can fix non-english characters.
- You can host the ChatTranslation.php yourself, it's contained in the zip file.

+ChatTranslation.php completed languages+
If language is not listed the non-english characters won't work.
Translators please see this thread.
- German
- Turkish
- French
- Swedish
- Spanish
- Danish
- Dutch
- Finnish
- Bulgarian
- Romanian
- Lithuanian
- More to come.

+games supported+
- Counter-Strike
- Team Fortress Classic

+change log+
Version 1.0 ( 05-03-2009 )
-- Initial release.

Version 1.1 ( 05-03-2009 )
-- Added support for Team Fortress Classic.
-- Added the sv_langmod cvar for mod support.

Version 1.2 ( 05-06-2009 )
-- Fixed quotes cutting off the sentence.
-- The amx_langmenu will pop-up if client doesn't have a language set.

Version 1.3 ( 05-08-2009 )
-- Fixed some text display when a client doesn't select a language.
-- Fixed names displaying incorrectly in TFC if name used certain chars.

Version 2.0 ( 05-09-2009 )
-- Fixed the menu from displaying before player fully spawned.
-- Removed Serbian from the translations as it doesn't work well.
-- Added the sv_translatefile cvar, see the cvar section to see how it works.

fysiks 05-03-2009 22:18

Re: Chat Translation
 
Great concept, in theory. I have a feeling in actual usage it will not be of much use because most words will be spelled incorrectly ( from my experience). Or does google translation try and interpret mispelled words?

stupok 05-03-2009 22:24

Re: Chat Translation
 
This is very creative! Rockin'!

I'm thinking it would be pretty slow and inaccurate, but it's still a great idea :up: Slow and inaccurate is better than nothing.

I might inspect the code and make suggestions later.

hlstriker 05-03-2009 22:37

Re: Chat Translation
 
Yes, I thought the same thing. I would much rather read some misspelled / misinterpreted words than a bunch of mumbo-jumbo though!

It's also not as slow as I thought it would be. Thanks to Google only sending minimal data (it's pretty much only 1 string) via HTTP. Even using Google's Japanese server the delay between chat send/receive was only about 0.1 seconds.

stupok 05-03-2009 22:40

Re: Chat Translation
 
O_o wow, that's fast

orange 05-03-2009 23:26

Re: Chat Translation
 
Sounds like a good idea but i would rather not have people connecting from all around the world lagging up a u.s server

hlstriker 05-04-2009 00:45

Re: Chat Translation
 
Added support for Team Fortress Classic :)

BOYSplayCS 05-04-2009 06:08

Re: Chat Translation
 
Wow this is very nice!

KadiR 05-04-2009 06:32

Re: Chat Translation
 
wow, nice job dude ;)

hleV 05-04-2009 06:50

Re: Chat Translation
 
Um... Wow.

fantasist 05-04-2009 07:11

Re: Chat Translation
 
Very impressive idea!

SchlumPF* 05-04-2009 07:14

Re: Chat Translation
 
i wonder why i never get such ideas.... very nice idea :D

Hunter-Digital 05-04-2009 07:54

Re: Chat Translation
 
Great ideea! :crab: (don't know what the crab means but anyway :lol: )

Nextra 05-04-2009 08:09

Re: Chat Translation
 
Quote:

Originally Posted by Hunter-Digital (Post 820751)
Great ideea! :crab: (don't know what the crab means but anyway :lol: )

It's a crab, sign for pure awesome (and also made of such).

Nice concept but I, personally speaking, do not like translation services at all. It is sometimes handy to get the gist of what people are talking about but mostly it's nonsense stuff that comes out.

DarkGod 05-04-2009 08:11

Re: Chat Translation
 
Quote:

Originally Posted by Nextra (Post 820757)
It's a crab, sign for pure awesome (and also made of such)..

!seals


:crab:

Arkshine 05-04-2009 08:11

Re: Chat Translation
 
Nice idea, but I agree with Nextra.

hlstriker 05-04-2009 15:03

Re: Chat Translation
 
Quote:

Originally Posted by Nextra (Post 820757)
...but mostly it's nonsense stuff that comes out.

I tested this with a friend from Germany and around ~80%+ of the words seemed to be correct. Sometimes the phrases got a bit mixed up but that's nothing the human brain can't easily fix :)

hlstriker 05-06-2009 21:37

Re: Chat Translation
 
Upgraded to Version 1.2 - See change log.

{PHILMAGROIN} 05-06-2009 22:14

Re: Chat Translation
 
All i have to say is it sounds great to me! very unique idea. and if you guys understood 80% thats even better!

hlstriker 05-09-2009 03:15

Re: Chat Translation
 
Upgraded to Version 1.3 - See change log.

beckham9224 05-09-2009 03:26

Re: Chat Translation
 
Excellent Work!

Lt Llama 05-09-2009 04:05

Re: Chat Translation
 
Hlstriker strikes back. An absolutelly must go on Euroskillz. TODAY. I have completelly missed this. Why didnt you say somthing?

Xellath 05-09-2009 04:14

Re: Chat Translation
 
Quote:

Originally Posted by Nextra (Post 820757)
Nice concept but I, personally speaking, do not like translation services at all. It is sometimes handy to get the gist of what people are talking about but mostly it's nonsense stuff that comes out.

Agreed, still this is awesome work by hlstriker. GJ!

hlstriker 05-09-2009 04:20

Re: Chat Translation
 
Quote:

Originally Posted by Lt Llama (Post 823991)
Hlstriker strikes back. An absolutelly must go on Euroskillz. TODAY. I have completelly missed this. Why didnt you say somthing?

I have minions to say these things for me (aka Gogeta)! No, but really we were testing a few things tonight and Gogs came to the conclusion the Euroskillz servers need this for Son Goku, haha.

I just got back into the TFC scene again, sort of. I'm still waiting for the updates for FF though as that seems to be my game of interest right now.

Also, thanks to everyone who gave feedback on this; feedback is always very much appreciated :)

Lt Llama 05-09-2009 09:04

Re: Chat Translation
 
I am not sure I have the right language.txt still.
Hm, just realise im running 1.76d. Could that be the problem?
When I chose amx_langmenu and select personal language I have to click 24 times to get back to English. But there are only 20 languages in language.txt.

A player said that when he click 1 to select personal language the menu disappears.
All I see now is homik: [EN->SV] content-type.
homik: [EN->SV] content-type

hlstriker 05-09-2009 18:14

Re: Chat Translation
 
Upgraded to Version 2.0 - See change log.

Xellath 05-09-2009 18:19

Re: Chat Translation
 
I am going to say it again. Good Job. :crab:

hlstriker 05-10-2009 02:38

Re: Chat Translation
 
Quote:

Originally Posted by Lt Llama (Post 824105)
I am not sure I have the right language.txt still.
Hm, just realise im running 1.76d. Could that be the problem?
When I chose amx_langmenu and select personal language I have to click 24 times to get back to English. But there are only 20 languages in language.txt.

I'm running version 1.8.1 without a problem. I did notice that problem in your server last night too though.

Quote:

Originally Posted by Lt Llama (Post 824105)
A player said that when he click 1 to select personal language the menu disappears.
All I see now is homik: [EN->SV] content-type.
homik: [EN->SV] content-type

Just fixed that in 2.0 :)

Lt Llama 05-11-2009 01:45

Re: Chat Translation
 
Quote:

Originally Posted by hlstriker (Post 823998)
Gogs came to the conclusion the Euroskillz servers need this for Son Goku, haha.

I had this running as you know. Goku enters.
Me: Goku, say amx_langmenu
Goku: What?
Me: Goku, type amx_langmenu in console
Goku: ehe
Me: Goku, type amx_langmenu in console
Goku: Whats up with this lag?
Me: ...

Find a spanish talking dude who explains the purpose of your plugin.
Or have a translated message on connect explaining it.

Suggestion #1: I am still worried about any lag issues from this. You know concers :p. What happens when the server sends a sentence to Google and waits for a reply? Is it possible that this delay can cause lag? Maybe add a debug option to see how long time it takes for the message to be sent and come back translated.

Suggestion #2: Add an option for admins to enable or disable it with an amx_ command.
Maybe even a cvar to only show admins translations.

Suggestion #3: The plugin could actually be educational if you also could see the original sentence + the translation. Maybe we pick up a word or two from a foreign language and actually learn something useful while gaming :). But could be spammy.

hlstriker 05-11-2009 01:51

Re: Chat Translation
 
Quote:

Originally Posted by Lt Llama (Post 825322)
Suggestion #1: I am still worried about any lag issues from this. You know concers :p. What happens when the server sends a sentence to Google and waits for a reply? Is it possible that this delay can cause lag? Maybe add a debug option to see how long time it takes for the message to be sent and come back translated.

Suggestion #2: Add an option for admins to enable or disable it with an amx_ command.
Maybe even a cvar to only show admins translations.

Suggestion #3: The plugin could actually be educational if you also could see the original sentence + the translation. Maybe we pick up a word or two from a foreign language and actually learn something useful while gaming :). But could be spammy.

Haha, poor Goku :)

Answers:
1) This shouldn't cause any lag as it continues on with the plugin while it waits for the translation response. Are you noticing lag with it?

2) I'll look into adding both these cvars soon.

3) I'll also make an option for players to enable this, I like the idea :)

Howdy! 05-11-2009 10:49

Re: Chat Translation
 
Good job mate.. It was fun to test this with you lmao. :wink:

Exolent[jNr] 06-18-2009 18:09

Re: Chat Translation
 
The only problem I could see is you do this quite often:
Code:
if( equal(szString, "") )
When you should just do:
Code:
if( !szString[0] )

romath 06-13-2010 12:50

Re: Chat Translation
 
awesome!

romath 06-17-2010 11:37

Re: Chat Translation
 
:nono:

winds 08-30-2010 00:00

Re: Chat Translation
 
Is it possible to make this plugin work with the "detect language" feature on google translate? Instead of having the client have to change their language settings in amx, because a lot of players don't do that.

.Dare Devil. 10-02-2010 14:57

Re: Chat Translation
 
the thing is just one mistake. If a player who speaks a different language spell the word incorrectly, the results are the same.... but very nice plugin , I love it!

rememb 10-26-2010 10:03

Re: Chat Translation
 
Is there some way to translate everything into Swedish instead of English?
I´ve been looking into the php file, but didnt find anything. Havnt seen the plugin ingame though.

Arkshine 10-26-2010 10:37

Re: Chat Translation
 
If you want to change the default language 'english' for people who have not a languauge set, search in the plugin, line 199 and change "en" by "sv".

rememb 10-27-2010 08:54

Re: Chat Translation
 
Quote:

Originally Posted by Arkshine (Post 1334369)
If you want to change the default language 'english' for people who have not a languauge set, search in the plugin, line 199 and change "en" by "sv".

I want to translate all the chat messages to swedish for everyone, including those who have english as their set language.

rememb 10-27-2010 08:55

Re: Chat Translation
 
Everyone is supposed to read in swedish.


All times are GMT -4. The time now is 06:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.