Google has released a feature for Google Docs that will automatically translate whole documents into any one of 42 different languages.

Unlike existing web translation services which work on short phrases or text passage, the software will handle a whole document. All the formatting and layout is preserved no matter what language it is in.

Google accepts that the translations are far from perfect, but said it would be continuously working on improving translation quality over time.

The company has developed its own statistical translation system for the language pairs now available on Google Translate.

This is said to be different from other machine-translation systems in that it doesn’t rely on a rule-based approach, which tend to require a lot of work to define vocabularies and grammars.

In an official blog Google explained that its system instead feeds billions of words of text, both monolingual text in the target language, and aligned text consisting of examples of human translations between the languages. From there it applies statistical learning techniques to build a translation model.

One way it can improve quality, is to source large amounts of bilingual text, and the company is looking for contributions.