Create documents in multiple languages with LaTeX. Learn babel, polyglossia, font selection, and internationalization best practices for global documents.
Master the creation of multi-language documents in LaTeX. This guide covers language packages, font configuration, bidirectional text, special characters, and internationalization strategies for professional multilingual publications.
Prerequisites: Basic LaTeX knowledge Time to complete: 30-35 minutes Difficulty: Intermediate to Advanced What you’ll learn: Language packages, fonts, encoding, hyphenation, and localization
\documentclass{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}% Load languages (last one is default)\usepackage[spanish, french, english]{babel}\begin{document}% English (default)\section{Introduction}This document demonstrates multi-language support.% Switch to French\selectlanguage{french}\section{Introduction}Ce document démontre le support multilingue.% Switch to Spanish \selectlanguage{spanish}\section{Introducción}Este documento demuestra el soporte multilingüe.% Back to English\selectlanguage{english}% Inline language switchingThis is English text with some \foreignlanguage{french}{mots français} and \foreignlanguage{spanish}{palabras españolas}.\end{document}
\documentclass{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[french, spanish, english]{babel}\begin{document}% Date formatting\selectlanguage{english}Today's date: \today\selectlanguage{french}Date d'aujourd'hui: \today\selectlanguage{spanish}Fecha de hoy: \today% Hyphenation patterns\selectlanguage{english}\hyphenation{hy-phen-a-tion ex-am-ple}This is a hyphenation example with very long words.% Language-specific typography\selectlanguage{french}\frenchspacing % French spacing rulesVoici un exemple : avec les espaces françaises !% Quotes\selectlanguage{english}English ``quotes'' are different from \selectlanguage{french}\og guillemets français\fg{} and \selectlanguage{spanish}<<comillas españolas>>.% Language attributes\selectlanguage{english}\languageattribute{english}{american} % American EnglishColor, organize, analyze.\languageattribute{english}{british} % British English Colour, organise, analyse.\end{document}
\documentclass{article}\usepackage{polyglossia}% Set main language\setdefaultlanguage{english}% Set other languages\setotherlanguages{french, spanish, arabic, chinese}% Font configuration\usepackage{fontspec}\setmainfont{Linux Libertine O}\setsansfont{Linux Biolinum O}\setmonofont{Inconsolata}% Language-specific fonts\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri}\newfontfamily\chinesefont[Scale=0.9]{Noto Sans CJK SC}\begin{document}\section{Multilingual with Polyglossia}This is English text.\begin{french}Ceci est un texte français avec les bonnes règles typographiques.\end{french}\begin{spanish} Este es un texto español con la tipografía correcta.\end{spanish}\begin{arabic}هذا نص عربي مع الاتجاه الصحيح من اليمين إلى اليسار.\end{arabic}\begin{chinese}这是中文文本,使用正确的字体。\end{chinese}\end{document}
\documentclass{article}\usepackage{polyglossia}\usepackage{bidi} % For older systems\setdefaultlanguage{english}\setotherlanguage{arabic}\setotherlanguage{hebrew}\usepackage{fontspec}\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Scheherazade}\newfontfamily\hebrewfont[Script=Hebrew,Scale=1.1]{David CLM}\begin{document}\section{Bidirectional Text Support}This is left-to-right English text.\begin{arabic}\subsection{النص العربي}هذا نص من اليمين إلى اليسار. يمكن مزج \textLR{English words} في النص العربي.\begin{itemize} \item البند الأول \item البند الثاني مع \textLR{LTR text} \item البند الثالث\end{itemize}\end{arabic}Mixed paragraph: The Arabic phrase \textarabic{السلام عليكم} means"peace be upon you" and the Hebrew \texthebrew{שלום} means "peace/hello".\begin{hebrew}\subsection{טקסט עברי}זהו טקסט מימין לשמאל בעברית. אפשר לשלב \textLR{English} בתוך העברית.\end{hebrew}% Tables with RTL text\begin{table}[h]\centering\begin{tabular}{|c|c|c|}\hlineEnglish & \textarabic{عربي} & \texthebrew{עברית} \\\hlineHello & \textarabic{مرحبا} & \texthebrew{שלום} \\Goodbye & \textarabic{وداعا} & \texthebrew{להתראות} \\Thank you & \textarabic{شكرا} & \texthebrew{תודה} \\\hline\end{tabular}\caption{Multilingual greetings}\end{table}\end{document}
\documentclass{article}\usepackage{fontspec} % XeLaTeX/LuaLaTeX\usepackage{polyglossia}\setdefaultlanguage{english}\setotherlanguages{russian, greek, japanese, arabic}% Main document fonts\setmainfont[ Ligatures=TeX, BoldFont={* Bold}, ItalicFont={* Italic}, BoldItalicFont={* Bold Italic}]{TeX Gyre Termes}\setsansfont[ Ligatures=TeX, Scale=0.9]{TeX Gyre Heros}\setmonofont[ Scale=0.9]{Inconsolata}% Language-specific fonts\newfontfamily\russianfont[ Script=Cyrillic, Ligatures=TeX]{PT Serif}\newfontfamily\greekfont[ Script=Greek, Ligatures=TeX]{GFS Artemisia}\newfontfamily\japanesefont[ Script=CJK, Scale=0.9]{Noto Sans CJK JP}\newfontfamily\arabicfont[ Script=Arabic, Scale=1.2, RightToLeft=true]{Scheherazade}\begin{document}\section{Font Configuration for Multiple Languages}Default English text uses TeX Gyre Termes.\begin{russian}Русский текст использует шрифт PT Serif, который хорошо поддерживает кириллицу.\end{russian}\begin{greek}Το ελληνικό κείμενο χρησιμοποιεί τη γραμματοσειρά GFS Artemisia.\end{greek}\begin{japanese}日本語のテキストはNoto Sans CJK JPフォントを使用します。\end{japanese}\begin{arabic}النص العربي يستخدم خط Scheherazade مع دعم كامل للغة العربية.\end{arabic}\end{document}
\documentclass{article}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[english, german, french]{babel}\begin{document}\section{Hyphenation Examples}% English hyphenation\selectlanguage{english}\hyphenation{hy-phen-a-tion ex-am-ple spe-cial-word}This is a demonstration of hyphenation in English with some extraordinarily long words that need proper hyphenation patternsto break correctly at line endings.% German hyphenation\selectlanguage{german}\hyphenation{Sil-ben-tren-nung Bei-spiel-wör-ter}Dies ist eine Demonstration der Silbentrennung im Deutschen mitaußergewöhnlich langen Wörtern, die ordnungsgemäße Trennmusterbenötigen.% French hyphenation\selectlanguage{french}\hyphenation{hy-phe-na-tion ex-em-ple}Ceci est une démonstration de la césure en français avec des motsextraordinairement longs qui nécessitent des modèles de césureappropriés.% Prevent hyphenation\selectlanguage{english}\mbox{Unhyphenatable} word or \hbox{compound expression}.\end{document}
\documentclass{report}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[english, spanish, french, german]{babel}\usepackage{csquotes} % Context-sensitive quotes% Chapter names in different languages\addto\captionsenglish{\renewcommand{\chaptername}{Chapter}}\addto\captionsspanish{\renewcommand{\chaptername}{Capítulo}}\addto\captionsfrench{\renewcommand{\chaptername}{Chapitre}}\addto\captionsgerman{\renewcommand{\chaptername}{Kapitel}}\begin{document}% Title page in multiple languages\begin{titlepage} \centering \vspace*{2cm} {\Huge\bfseries Multilingual Report\\ Rapport Multilingue\\ Informe Multilingüe\\ Mehrsprachiger Bericht\par} \vspace{2cm} {\Large\itshape International Organization\\ Organisation Internationale\\ Organización Internacional\\ Internationale Organisation\par} \vfill {\large\today\par}\end{titlepage}\tableofcontents\selectlanguage{english}\chapter{Introduction}This report is written in multiple languages...\selectlanguage{french}\chapter{Introduction}Ce rapport est rédigé en plusieurs langues...\selectlanguage{spanish}\chapter{Introducción}Este informe está escrito en varios idiomas...\selectlanguage{german}\chapter{Einleitung}Dieser Bericht ist in mehreren Sprachen verfasst...\end{document}
\documentclass{book}\usepackage{fontspec} % XeLaTeX\usepackage{polyglossia}\usepackage{csquotes}\usepackage{datetime2}\usepackage{siunitx}\usepackage{lipsum}% Language setup\setdefaultlanguage[variant=american]{english}\setotherlanguages{french, german, spanish, russian, arabic, japanese}% Font configuration\setmainfont{TeX Gyre Termes}\setsansfont{TeX Gyre Heros}\setmonofont{Inconsolata}% Language-specific fonts\newfontfamily\russianfont{PT Serif}\newfontfamily\arabicfont[Script=Arabic]{Amiri}\newfontfamily\japanesefont{Noto Sans CJK JP}% Metadata\title{Multilingual Document Example\\\large Exemple de Document Multilingue\\Mehrsprachiges Dokumentbeispiel}\author{International Author}\date{\today}\begin{document}\frontmatter\maketitle\begin{abstract}This document demonstrates comprehensive multilingual support in LaTeX,including various scripts, bidirectional text, and localization features.\end{abstract}\tableofcontents\mainmatter\chapter{Introduction}\section{English Section}This document showcases LaTeX's capabilities for handling multiple languagesand scripts within a single document. We'll explore various features including:\begin{itemize} \item Font selection and configuration \item Bidirectional text support \item Proper hyphenation and line breaking \item Localized formatting \item Special characters and symbols\end{itemize}\section{Section Française}\begin{french}Cette section démontre le support du français avec :\begin{itemize} \item Les guillemets français : \enquote{exemple} \item Les espaces insécables : voici ! \item La date : \today \item Les nombres : \num{1234567.89}\end{itemize}\end{french}\section{Deutscher Abschnitt}\begin{german}Dieser Abschnitt zeigt die deutsche Unterstützung mit:\begin{itemize} \item Deutsche Anführungszeichen: \enquote{Beispiel} \item Datum: \today \item Zahlen: \num{1234567.89} \item Silbentrennung für lange Wörter\end{itemize}\end{german}\chapter{Advanced Features}\section{Bidirectional Text}\begin{english}This chapter includes Arabic text: \textarabic{مرحبا بالعالم} (Hello World)embedded within English paragraphs.\end{english}\begin{arabic}هذا قسم كامل باللغة العربية. يُظهر الدعم الكامل للنص من اليمين إلى اليسارمع الخطوط والتنسيق المناسبين. يمكن تضمين \textLR{English text} داخل العربية.\end{arabic}\section{Asian Languages}\begin{japanese}日本語のサポートも含まれています。これは日本語のテキストの例です。LaTeXは複雑な文字体系も処理できます。\end{japanese}\chapter{Reference Section}\section{Common Phrases}\begin{tabular}{llll}\textbf{English} & \textbf{Français} & \textbf{Deutsch} & \textbf{Español} \\Hello & Bonjour & Hallo & Hola \\Thank you & Merci & Danke & Gracias \\Goodbye & Au revoir & Auf Wiedersehen & Adiós \\\end{tabular}\backmatter\appendix\chapter{Technical Notes}This document was compiled with XeLaTeX to support Unicode andadvanced font features. All languages are properly configured withappropriate hyphenation patterns and typography rules.\end{document}
Pro tip: Always test your multilingual documents thoroughly. Check that text is searchable and copyable in the PDF, verify that hyphenation works correctly, and ensure that all special characters display properly. Consider creating language-specific style files for frequently used configurations.