Garry's Mod

Garry's Mod

616 个评价
Auto Chat Translate
5
3
2
2
2
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 漫画, 快乐, 角色扮演
文件大小
发表于
更新日期
8.780 KB
2023 年 12 月 1 日 上午 3:53
2023 年 12 月 2 日 上午 6:05
3 项改动说明 ( 查看 )

订阅以下载
Auto Chat Translate

描述
I stole this idea from a cheat and wrote it in about 10 minutes (not accounting for time spent updating it lol).

This uses the google translate api (or libretranslate if you wish so), but you don't need any sort of authorization (which will cause stupid strict ratelimiting).

Usage:
Refer to https :// cloud .google .com/translate/docs/languages for language codes.
1) Change cl_translator_target_language. It controls what language everyones message translates into.
2) Change cl_translator_send_target_language. It controls what language your own messages, if prefixed by "!at", translate into.
3) Use the !at command in chat to translate your text.
4) You don't need to do anything else to have messages by other players translated.

Commands:
cl_translator_target_language "ru" -> Language code to translate other messages to.
cl_translator_send_target_language "ru" -> Language code to translate your own messages to.
cl_translator_delay "10" -> A delay between messages being translated.
cl_translator_type "google" -> libre - libretranslate .com (use a selfhosted instance), google - translate .google .com
cl_translator_libreurl "http :// localhost :5000/" -> The instance URL to use when using the libre translator type.
cl_translator_librekey "" -> API Key for the libretranslate instance. Not needed if the translator type is google.
cl_translator_chat_prefix "!at" -> Prefix for the command to translate your own message.

As mentioned previously you might get ratelimited and I have no guarantee you wont even with default settings. Try setting the delay to a higher value if you still get limited.

If you want to use this on a server that doesn't have it installed, you can try a lua loader. Anti cheats will kill you for it though :)
113 条留言
EdosPonos 3 月 23 日 下午 1:23 
what to do if it doesn't translate and it says in the chat "Failed translation. No data?"
BaJlepa 6oJlbIIIou' eJlDaK  [作者] 2024 年 10 月 7 日 上午 4:48 
pohui)
Provatan 2024 年 10 月 2 日 上午 2:02 
Ахахах а страница в стиме не переведне
distantexplosion 2024 年 10 月 2 日 上午 1:31 
Does this work for German?
BaJlepa 6oJlbIIIou' eJlDaK  [作者] 2024 年 10 月 2 日 上午 12:17 
sorry for your loss
>KB> >KEKSQUAD 2024 年 9 月 29 日 下午 1:56 
[ERROR] lua/autorun/client/auto_translate.lua:44: Tried to use a NULL entity!
1. Name - [C]:-1
2. onsuccess - lua/autorun/client/auto_translate.lua:44
3. unknown - lua/includes/modules/http.lua:58
>KB> >KEKSQUAD 2024 年 9 月 16 日 上午 9:03 
Pro-tip: you can also type gmod_language en into console to see what language code your game is using
Pamelkin 2024 年 6 月 30 日 下午 10:36 
что делаь если консоль не видит команду
BaJlepa 6oJlbIIIou' eJlDaK  [作者] 2024 年 5 月 30 日 上午 11:45 
this is already clientside, all you need is a way to execute it anywhere you want
AToM1C 2024 年 5 月 30 日 上午 11:25 
can someone make this clientside