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.

Contents

[edit] Installing

The code for this module can be found here. Follow the Compiling modules page to compile it.

[edit] Usage

Arguments

This user module takes no arguments.

Read loading modules to learn more about loading modules.

[edit] Configuration

Configuration is done via *translate

[edit] Commands

+---------+------------------------------+------------------------------------------------------+
| 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.

[edit] Version history

[edit] 2010-06-25

Fixed compilation errors for ZNC 0.090.

[edit] 2010-04-22

Add support for set #channel/nick.

[edit] 2009-12-01

First version.

[edit] Note

Contact DarthGandalf on irc://irc.freenode.net/#znc, or DGandalf on irc://irc.efnet.org/#znc for bug reports and suggestions.