# Advice for multilingual document with many languages

I need to create a document with snippets in many languages - between 10 and 30 of them. I've seen people suggest XeLaTeX, but I'm working on a system that I don't have control over and that's a separate issue. For now, I'd like to do this on shareLaTeX. I started by trying babel

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[german, french, italian, spanish, portuguese, russian, arabic, hebrew, scottish, irish, english]{babel}
\usepackage{CJKutf8} %for chinese, korean, japanese

\begin{document}

\begin{enumerate}
\item one
\item %\foreignlanguage{scottish}{ceithir}
\item aon d\'eag %foreignlanguage{irish}{aon d\'eag}
\item fiche a c\'uig %foreignlanguage{irish}{fiche a c\'uig}
\end{enumerate}

\end{document}


but I exceed the default TeX capacity of shareLaTeX, presumably because I have too many languages. Hyphenation would be nice but isn't a hard requirement, and I realize I could typeset some languages without loading any packages. Should I be loading fonts instead for things like Cyrillic, Chinese, or Arabic? Should I be entering everything in hex or decimal unicode? I'll be on a mix of Windows and Linux machines, with an American QWERTY keyboard. What might be the best way for me to go about this?

• I was in a similar situation, typesetting small pieces in multiple languages. It would have mostly been fine, but once you start playing with Hebrew all is lost and things begin to break all over. That is when I switched to XeLaTeX, which I suggest you do as well to keep your sanity. If you must, try using a single font that has all the characters that you need (Linux Libertine?) and forget about loading packages or hyphenation. If all you need to do is short fragments, that should be all. Enter things in UTF to make it all work. – ANSI C Mastah Feb 10 '15 at 16:54
• @ANSICMastah Whether or not I have any sanity left to lose is another matter, but like I said, I'm almost certain I don't have an XeLaTeX option here. If Hebrew is the dealbreaker, I could in theory leave it out...I might just make some people mad... – aeroNotAuto Feb 10 '15 at 16:57
• I just tried using no packages and typing UTF-encoded text, but you very quickly run into trouble. The best I can suggest is that you try babel for all languages and encode the file using UTF8. For languages that don't seem to work, like Hebrew, try using package that transliterates the relevant alphabet, like cjhebew. – ANSI C Mastah Feb 10 '15 at 17:15
• @ANSICMastah Okay. Is there a way for me to load that many babel languages without exceeding the TeX capacity of shareLaTeX? I know if it were plots instead of languages, I can externalize them, for example. – aeroNotAuto Feb 10 '15 at 17:18
• I am not familiar with shareLaTeX: @nplatis says that it does allow you access to XeLaTeX as a processor, and if so: use it! Then you simply type and text in UTF and watch your troubles go away. – ANSI C Mastah Feb 10 '15 at 17:26

With ShareLaTeX you do have the option to use XeLaTeX as your document processor, so you can work with a Unicode input file. In theory, this would allow you to input whatever characters you like and, provided you use a suitable font, have it compiled without too many troubles.