TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing some templates and class files that need to use some strings of text, say names for theorems, lemmas, etc., and I would like to provide the ability to easily switch the language in which these pieces of text are written; much like Babel does for standard LaTeX document classes.

The question is what would be the preferred way to implement this? Is there a way to make it work nicely together with Babel (e.g. somehow “read” the chosen language in babel options and use this for my own text labels)?

share|improve this question
up vote 11 down vote accepted

You can provide a switch in your class for language or use it locally if you wish. You can add 'captions' as you wish, using babel's mark-up for the language, for example for Greek:

share|improve this answer
Excellent! Simple and works as advertised. – Juan A. Navarro Oct 5 '10 at 11:37

The translator package might help. It should be part of your TeX installation since it is shipped with the beamer class (which uses it).

share|improve this answer
Thanks for this great suggestion and bringing to my attention this package! However for my small needs perhaps the solution with babel proposed by Yiannis will be more than enough. – Juan A. Navarro Oct 5 '10 at 11:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.