2

How can synonyms be defined to allow loading babel with, e.g., \usepackage[nl-NL,en-GB]{babel} rather than \usepackage[dutch,english]{babel}?

4
  • What do you want that for? Babel works fine as specified.
    – jarnowicz
    Commented Jun 3, 2015 at 19:26
  • 1
    @Lusr56 I imagine it would make integration with I18N applications a little more straightforward. Commented Jun 3, 2015 at 20:23
  • 2
    @SeanAllred What we need then may be a whole rewrite of babel, renaming all internal language codes to conform to RFC-5646.
    – jarnowicz
    Commented Jun 3, 2015 at 21:37
  • @Lusr56 I hear the maintainer accepts patches ;) Commented Jun 3, 2015 at 22:25

1 Answer 1

3

Just create a proxy file. For example, for Dutch the file would be nl-NL.ldf and its contents

\def\CurrentOption{dutch}
\input{dutch.ldf}

For en-GB.ldf it would be:

\def\CurrentOption{british}
\input{english.ldf}

But the language names, as set in \selectlanguage and the like, are still dutch and british, respectively.

3
  • So, again, what's the gain?
    – jarnowicz
    Commented Jun 3, 2015 at 20:09
  • @Lusr56 I've edited the answer to show this case. Commented Jun 4, 2015 at 6:47
  • I removed my objection and edited the answer to make it complete and explicit.
    – jarnowicz
    Commented Jun 4, 2015 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .