Multilingual translator

From BZFlagWiki
Jump to: navigation, search

**This code is a "proof-of-concept" only. It violates the Google TOS for it's web-transator.**

A multilingual translator patch at SourceForge

A two level system of translating game chat from and to many languages using the Google translation web interface.

The translator uses the Google web interface and will translate to and from the following (in a non blocking way):

List of supported languages:[edit]

  • Arabic(ar)
  • Bulgarian(bg)
  • Croatian(hr)
  • Czech(cs)
  • Danish(da)
  • Dutch(nl)
  • English(en)
  • Finnish(fi)
  • French(fr)
  • German(de)
  • Greek(el)
  • Hindi(hi)
  • Italian(it)
  • Norwegian(no)
  • Polish(pl)
  • Portuguese(pt)
  • Romanian(ro)
  • Russian(ru)
  • Spanish(es)
  • Swedish(sv)

The patch implements:[edit]

1) / command with the syntax: /translate (lang-code) (lang-code) message

2) a menu invoked with the key C to create/cancel/list a static rule to translate automatically all received/sent messages to/from public, team, or admin channels and players to/from supported languages. The rules are saved to the config.cfg when the game exits and are reloaded when the client is loaded.

3) In addition, received messages are kept in a buffer. Then, it is also possible to select via the key C menu such recorded messages and to translate them.