23

I want to add support for a new language to TeX and friends. What do I need to do to achieve this?

We have had questions about Lao, Asturian, Cyrillic and Tajik, but this CW question is supposed to be general non-specific advice about adding language support.

Seamus
  • 73,242

2 Answers2

9

This is basically just a list of things culled from the above linked questions.

Basics

For any new language you'll usually need to create a “language definition file”. There are two packages to localize documents: babel (pdfLaTeX, XeLaTeX, LuaLaTeX) and polyglossia (XeLaTeX, LuaLaTeX). (See a comparison.)

Hyphenation

You will need to tell TeX how to hyphenate words in your language. This TUGboat article and this tutorial on CTAN should help. You could then send the generated hyphenation patterns to TUG for inclusion in TeXlive. (Information from this question)

Chapter/Section words

*TeX will also need to know what to do with commands like \chapter. That is, you need to tell it how to say "Chapter" in your language. Specifically, you need to tell *TeX what to do with the \chaptername macro. This information, again, should be in the language definition file. (Source)

This applies to \today, too, which should print the current date according to the corresponding language and culture.

Punctuation rules

If your language has punctuation rules that differ from the standard ("American") ones, then these should be specified. You may want to look at adding support for your language to the csquotes package if it differs from those languages already defined.

Bibliographies

If you use BibLaTeX, you will have to define plenty of macros for "Editor", "Translator" and the like, as well as making the citation styles conform to your standards.

New alphabet support

To use a different alphabet, the easiest way is almost certainly XeLaTeX or LuaLaTeX which will allow you to use any font files installed on your system. Basic information in this answer, more detailed information in the XeTeX companion and the fontspec manual.

Javier Bezos
  • 10,003
Seamus
  • 73,242
  • 2
    Please do add to this answer. Professionally, I'm monoglot, so I've never had to do anything other than British English... – Seamus Apr 04 '11 at 12:08
6

You can add basic support with babel when used with XeTeX or LuaTeX easily:

Javier Bezos
  • 10,003