# LaTex i18n (integrate a new package's strings with babel)

Suppose I'm preparing LaTeX package to give the abstraction of admonition boxes (warning, error, tip, note, fyi, ...).

I'd like to have theses strings internationalized. I wouldn't appreciate the following solutions:

• "generic" box, let the user give the title and icon.
• add an option to your sty file so that the user can configure the language
• make many sty files suffixed by the language code

The "babel" package is capable of defining some i18n strings (Table of Contents, Table des matières, ...).

Is it possible to integrate the strings used in my package with a i18n system?

Sorry but searching for latex, i18n, babel, interface, integration or whatever don't give me useful results (most people have doubts on how to get babel to work in their documents).

-

## migrated from stackoverflow.comNov 17 '11 at 16:18

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  Torbjørn T. Nov 17 '11 at 16:32
For ignorants like me: What the heck are "i18n" strings? –  Daniel Nov 17 '11 at 20:05
–  cjorssen Nov 19 '11 at 13:03
–  Yiannis Lazarides Feb 11 '12 at 18:25

You could try the »translator« package that is shipped with the beamer class. It is described in Section 25 of the class user guide.

-

Maybe a late answer, but babelallows you to have separate .cfg files with the name of the language (UKenglish.cfg, norsk.cfg, swedish.cfg, etc.) and use the babel macro addto{<caption_name>}.

For example, I have a file UKenglish.cfg in my texmf-local directory, with the following definition used by my own macros:

%% UKenglish.cfg
%% Local config file UKenglish.cfg used by babel

%% to add an entry to english

And I have a corresponding norsk.cfg to cover the two languages I mostly use.