To create new wiki account, please join us on #znc at freenode and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Translate

From ZNC
Jump to: navigation, search

This module acts as a translator between people, neither of whom know each other's language. Each person can just write in his/her preferred language, and this module will take care of translating both sides and seamlessly displaying the translated text to both parties. Module works for:

  • private messages between you and another person;
  • channels, between you and all other people on that channel;
  • channels, between you and one particular other person on that channel.

The module uses Google Translate via its API.

Google chose to close its Translate API at 2011-12-01 and made it a paid service, so the module is broken currently. I'll need to find another way to translate stuff. If someone wishes to help, welcome.

Installing[edit]

The code for this module can be found here (https://raw.github.com/DarthGandalf/znc/0d9392149528b7f95d941c85c5df54bc56f92a57/modules/translate.cpp raw). Follow the Compiling modules page to compile it.

Usage[edit]

Arguments

This user module takes no arguments.

Read loading modules to learn more about loading modules.

Configuration[edit]

Configuration is done via *translate

Commands[edit]

+---------+------------------------------+------------------------------------------------------+
| Command | Arguments                    | Description                                          |
+---------+------------------------------+------------------------------------------------------+
| my      | <xy>                         | Set your default language                            |
| set     | <channel> <xy> [<my>]        | Set language of channel                              |
| set     | <nick> <xy> [<my>]           | Set language of private messages for nick            |
| set     | <channel>/<nick> <xy> [<my>] | Set language for nick on channel                     |
| unset   | <channel or nick>            | Don't translate target anymore                       |
| clear   |                              | Clear all targets                                    |
| list    |                              | Show list of configured targets with their languages |
| help    |                              | Show this text                                       |
+---------+------------------------------+------------------------------------------------------+

You can use set #channel/nick to translate messages only to/from that nick on this channel. Messages to them have one of these forms (assuming, we speak to Nicky):

  • Nicky hello
  • Nicky, hello
  • Nicky: hello

set command has 1 optional parameter in the end - your language for translating conversations. If it's empty, using default, which is specified with my command.

Example:

set #znc/Nicky de bg

if you want to speak with Nicky (who is German) on #znc using Bulgarian.

Version history[edit]

2010-06-25[edit]

Fixed compilation errors for ZNC 0.090.

2010-04-22[edit]

Add support for set #channel/nick.

2009-12-01[edit]

First version.

Note[edit]

Contact DarthGandalf on irc://irc.freenode.net/#znc for bug reports and suggestions.