# Multi-language with comment package

Submitted by Nicola Rainiero on 2013-07-08 (last updated on 2015-05-13)

Do you want to keep a document with more languages and/or optional sections and maybe being able to turn on/off them whether necessary? The Comment package is the answer to these questions! I show you in WriteLaTeX how to set it with a practical template.

Following the thread: Is it possible to keep my translation together with original text? I have discovered this fantastic feature implemented by Victor Eijkhout in the Comment Package.

 The picture is self-explanatory

## How it works?

1. Simply you have to activate it writing in the head of the document:
\usepackage{comment}
2. Then add the calls in order to include or exclude chunks of text, in my case:
\includecomment{en}
\excludecomment{it}
Above the texts in English (en) are shown, the Italian (it) ones are ignored.
3. Finally in the document, you have to put the texts in this way:
\begin{en}
\huge{Text in English!}
\end{en}

\begin{it}
\huge{Testo in italiano!}
\end{it}


In a few words: quick and painless! Try it in writeLaTeX: Multi-language Test.

## Related Content:

### Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.