Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use tikzpicture in my document to draw my results and I use an enough generic way that I can reuse my tikz files in various document (article, thesis, beamer...).

I would like to set equivalent caption/label/keyword of my picture for different languages I use (typically english and french) and latex use the good one depending on the used language in the document. I would try the translator package but I can't find it anywhere, moreover I am not sure that is the good way to do that.

Is there a way to do that ?

It could look like :

\documentclass[french]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\begin{document}
\begin{figure}
\def\mycaption{Coucou}
% where \mycaption is different in french and english but I give both captions. 
% For example (but no there is no requirement of the way to do it) :
% \mycaption[english]{Hello}
% \mycaption[french]{Coucou}
\caption{\mycaption} 
\end{figure}
\end{document}
share|improve this question
2  
Would you please make an example of what you want to do? –  egreg Feb 14 '12 at 11:46
    
so you want to define commands like \i10nCaption that takes one argument (language) and returns the term “caption” in your language, so \i10nCaption{english} shoul return “caption”, while i10nCaption{german} (or deutsch if you prefer) should return “Abbildung” (i was too lazy to look up the french term. –  Ronny Feb 14 '12 at 12:03
    
@Ronny: Not really, I want to give two (or more but I don't know a piece of word of german ;-) ) equivalent captions or labels or whatever-you-want in two languages and babel or something else can you the right one depending on the language I use in my document. Is it clearer ? –  Sigmun Feb 14 '12 at 12:14
    
When i encountered the manual of translator, I understood roughly, what you wanted to do. –  Ronny Feb 14 '12 at 13:14
    
If captions are your only problem you could give my bicaption package a try. –  Axel Sommerfeldt Feb 15 '12 at 19:20
show 1 more comment

1 Answer

up vote 3 down vote accepted

Actually the translator-Package is available (see for example this manual ) on Sourceforge and should do, what you want to do, if i understood you right.
It is also included in the beamer package.

share|improve this answer
    
Thanks a lot, I miss the title page of the manual... –  Sigmun Feb 14 '12 at 12:23
add comment

Your Answer

 
discard

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.